|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.manager.login.ForgottenLoginManagerImpl
public class ForgottenLoginManagerImpl
Constructor Summary | |
---|---|
ForgottenLoginManagerImpl(ApplicationService applicationService,
DirectoryManager directoryManager,
PermissionManager permissionManager,
ResetPasswordTokenDao resetPasswordTokenDao,
com.atlassian.security.random.SecureTokenGenerator tokenGenerator,
ClientProperties clientProperties,
com.atlassian.event.api.EventPublisher eventPublisher)
|
Method Summary | |
---|---|
boolean |
isValidResetToken(long directoryId,
java.lang.String username,
java.lang.String token)
Returns true if the password reset token for the user with the specified username and directory ID are valid and not expired. |
void |
resetUserCredential(long directoryId,
java.lang.String username,
PasswordCredential credential,
java.lang.String token)
Resets the user credentials and invalidates the token. |
void |
sendResetLink(Application application,
java.lang.String username)
Sends a reset link to the first user with the matching username from all the active directories assigned to the application. |
void |
sendResetLink(long directoryId,
java.lang.String username)
Sends a reset link to the user with specified username and directory ID. |
void |
sendUsernames(Application application,
java.lang.String email)
Sends the usernames associated with the given email address. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForgottenLoginManagerImpl(ApplicationService applicationService, DirectoryManager directoryManager, PermissionManager permissionManager, ResetPasswordTokenDao resetPasswordTokenDao, com.atlassian.security.random.SecureTokenGenerator tokenGenerator, ClientProperties clientProperties, com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public void sendResetLink(Application application, java.lang.String username) throws UserNotFoundException, InvalidEmailAddressException, ApplicationPermissionException
ForgottenLoginManager
sendResetLink
in interface ForgottenLoginManager
application
- user is searched in application's assigned directoriesusername
- username of the user to send the password reset link
UserNotFoundException
- if no user with the supplied username exists
InvalidEmailAddressException
- if the user does not have a valid email address to send the password reset email to
ApplicationPermissionException
- if the application does not have permission to modify the userpublic void sendUsernames(Application application, java.lang.String email) throws InvalidEmailAddressException
ForgottenLoginManager
email
.
sendUsernames
in interface ForgottenLoginManager
application
- search application's assigned directories for usernames associated with the email
email
- email address of the user
InvalidEmailAddressException
- if the email
is not validpublic void sendResetLink(long directoryId, java.lang.String username) throws DirectoryNotFoundException, InvalidEmailAddressException
ForgottenLoginManager
Similar to ForgottenLoginManager.sendResetLink(Application, String)
except applying to a directory-specific
user.
sendResetLink
in interface ForgottenLoginManager
directoryId
- directory ID of the user to modifyusername
- username of the user to send the password reset link
DirectoryNotFoundException
- if the directory specified by directoryId could not be found
InvalidEmailAddressException
- if the user does not have a valid email address to send the password reset email topublic boolean isValidResetToken(long directoryId, java.lang.String username, java.lang.String token)
ForgottenLoginManager
ForgottenLoginManager.sendResetLink(com.atlassian.crowd.model.application.Application, java.lang.String)
.
isValidResetToken
in interface ForgottenLoginManager
directoryId
- directory ID of the user to validateusername
- username of the user to verify the tokentoken
- password reset token
public void resetUserCredential(long directoryId, java.lang.String username, PasswordCredential credential, java.lang.String token) throws DirectoryNotFoundException, UserNotFoundException, InvalidResetPasswordTokenException, OperationFailedException, InvalidCredentialException, DirectoryPermissionException
ForgottenLoginManager
resetUserCredential
in interface ForgottenLoginManager
directoryId
- directory ID of the userusername
- user name of the user to perform a credential resetcredential
- new credentialstoken
- password reset token
DirectoryNotFoundException
- if the directory could not be found.
UserNotFoundException
- if the user could not be found in the given directory.
InvalidResetPasswordTokenException
- if the reset token is not valid.
OperationFailedException
- if there was an error performing the operation or instantiating the backend directory.
InvalidCredentialException
- if the user's credential does not meet the validation requirements for an associated directory.
DirectoryPermissionException
- if the directory is not allowed to perform the operation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |