public abstract class ExternalAuthenticationProvider extends BaseCommunoteAuthenticationProvider
Constructor and Description |
---|
ExternalAuthenticationProvider() |
Modifier and Type | Method and Description |
---|---|
protected UserIdentification |
createUserIdentification(ExternalUserVO userVO)
Create the user identification to be used for the user service.
|
protected abstract ExternalSystemConfiguration |
getConfiguration()
Returns the configuration for the external authentication.
|
protected User |
getUser(UserIdentification userIdentification)
Get the user for the given identification
|
protected UserDetails |
handleRetrieveUserDetails(org.springframework.security.core.Authentication authentication)
Try to retrieve the user details by using
retrieveExternalUser(Authentication) and
synchronize the returned data with the local database. |
protected abstract ExternalUserVO |
retrieveExternalUser(org.springframework.security.core.Authentication authentication)
Tries to retrieve the user details from the associated external resource.
|
boolean |
supportsUserQuerying()
Checks if the provider is enabled and configured for user querying
|
authenticate, createSuccessAuthentication, getIdentifier, getInvitationFields, queryUser, retrieveAndAuthenticateUserDetails
protected UserIdentification createUserIdentification(ExternalUserVO userVO)
userVO
- the user vo previously retrieved.protected abstract ExternalSystemConfiguration getConfiguration()
protected User getUser(UserIdentification userIdentification) throws UserNotFoundException
userIdentification
- the identification (should contain the previously voUserNotFoundException
- in case user was not foundprotected final UserDetails handleRetrieveUserDetails(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
retrieveExternalUser(Authentication)
and
synchronize the returned data with the local database.handleRetrieveUserDetails
in class BaseCommunoteAuthenticationProvider
authentication
- the authentication detailsorg.springframework.security.core.AuthenticationException
- if there is no user for the provided authentication or the authentication cannot
be approvedBaseCommunoteAuthenticationProvider.handleRetrieveUserDetails(Authentication)
protected abstract ExternalUserVO retrieveExternalUser(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
authentication
- the authentication detailsorg.springframework.security.core.AuthenticationException
- if there is no user for the provided authentication or the authentication cannot
be approved. Subclasses should throw an appropriate sub-exception.public boolean supportsUserQuerying()
supportsUserQuerying
in class BaseCommunoteAuthenticationProvider
Copyright © 2019 Communote team. All rights reserved.