-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added requested methods #1164
base: master
Are you sure you want to change the base?
added requested methods #1164
Changes from 1 commit
2c8f62f
3dee326
f449284
8b6b846
ba01951
6b4e4d7
7b2f65f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,11 @@ public class AuthenticationService { | |
* Return false in any other cases. | ||
*/ | ||
public boolean login(String email, String password) { | ||
return false; | ||
if (email.equals("[email protected]") && password.equals("1234") || email.equals("[email protected]") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Create instanse of UserService There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
&& password.equals("1234")) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,10 @@ public class UserService { | |
* Return <code>null</code> if there is no suitable user | ||
*/ | ||
public User findByEmail(String email) { | ||
return null; | ||
if (email == "[email protected]" || email == "[email protected]") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in for loop get from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
return new User(email); | ||
} else { | ||
return null; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed