-
Notifications
You must be signed in to change notification settings - Fork 6
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
Im 73 users dont use email as unique and primary key 2 #132
Im 73 users dont use email as unique and primary key 2 #132
Conversation
…. Create an API call for the requesting.
…. Create an API call for the requesting.
…. Create an API call for the requesting.
…EmailResponse in the API response if the token is verifyed.
…and password are correct create function to update the email address in mongo and ldap, also set the user in the authentication context.
…. refactor:Delete some warnings and clean code.
import org.springframework.data.annotation.TypeAlias; | ||
|
||
@TypeAlias("VerifyEmail") | ||
public class TokenVerifyEmailClickback extends TokenClickback { | ||
|
||
private static final long serialVersionUID = 2577854654763037014L; | ||
private String notVerifiedEmail; |
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.
Question about naming (we know that naming is hard 😅): notVerifiedEmail
vs newEmail
?
} else if(type.equals(TokenType.verifyEmail)) { | ||
return new CreateVerifyEmailToken(repository, username, linkConfig).execute(); | ||
} 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.
Do we want to return null
or throw an Exception? 🤔
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.
Is for keeping the same structure.
throw new ActivationTokenFailedException("User Verification token failed"); | ||
} | ||
if (token == null) { | ||
throw new ActivationTokenFailedException("User Verification token failed"); |
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.
Why don't we use a different error message for the missing token and the exception?
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.
Is unreacheable code, I'll delete it.
No description provided.