public class AllowingAuthenticateByEmailApplicationService extends AbstractDelegatingApplicationService
ApplicationService.MembershipsIterable
Constructor and Description |
---|
AllowingAuthenticateByEmailApplicationService(ApplicationService delegate,
EmailAddressValidator emailValidator,
com.atlassian.event.api.EventPublisher eventPublisher,
CanonicalUsersByEmailFinder canonicalUsersByEmailFinder,
DcLicenseChecker dcLicenseChecker) |
Modifier and Type | Method and Description |
---|---|
User |
authenticateUser(Application application,
String usernameOrEmail,
PasswordCredential passwordCredential)
Will attempt to authenticate the given user against the application.
|
addAllUsers, addGroup, addGroupToGroup, addUser, addUser, addUserToGroup, expireAllPasswords, findGroupByName, findGroupWithAttributesByName, findRemoteUserByName, findUserByKey, findUserByName, findUserWithAttributesByKey, findUserWithAttributesByName, findWebhookById, getApplicationService, getCapabilitiesForNewUsers, getCurrentEventToken, getMemberships, getNewEvents, getUserAvatar, getUserAvatarLink, isGroupDirectGroupMember, isGroupNestedGroupMember, isUserAuthorised, isUserAuthorised, isUserDirectGroupMember, isUserNestedGroupMember, registerWebhook, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameUser, searchDirectGroupRelationships, searchGroups, searchNestedGroupRelationships, searchUsers, storeGroupAttributes, storeUserAttributes, unregisterWebhook, updateGroup, updateUser, updateUserCredential, userAuthenticated
public AllowingAuthenticateByEmailApplicationService(ApplicationService delegate, EmailAddressValidator emailValidator, com.atlassian.event.api.EventPublisher eventPublisher, CanonicalUsersByEmailFinder canonicalUsersByEmailFinder, DcLicenseChecker dcLicenseChecker)
public User authenticateUser(Application application, String usernameOrEmail, PasswordCredential passwordCredential) throws OperationFailedException, InactiveAccountException, InvalidAuthenticationException, ExpiredCredentialException, UserNotFoundException
ApplicationService
OperationFailedException
being thrown,
the authentication logic will skip those directories, instead relying on the operative ones, in the order defined in the application's directory mappings.
However, if the user, still, cannot be authenticated against any remaining directories, we suspect one of the bad directories must have held
the user account, in which case OperationFailedException
, which indicates the underlying cause of the first failing directory,
will be thrown from this method.authenticateUser
in interface ApplicationService
authenticateUser
in class AbstractDelegatingApplicationService
application
- the application to authenticate againstusernameOrEmail
- the username to authenticate againstpasswordCredential
- the password to use for authenticationOperationFailedException
- underlying directory implementation failed to execute the operation.InactiveAccountException
- if the users account is marked as inactiveInvalidAuthenticationException
- if authentication with the provided credentials failed, or potentially the user does not exist.ExpiredCredentialException
- if the users credentials have expiredUserNotFoundException
Copyright © 2021 Atlassian. All rights reserved.