public abstract class BaseCommunoteAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
Constructor and Description |
---|
BaseCommunoteAuthenticationProvider() |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
protected abstract org.springframework.security.core.Authentication |
createSuccessAuthentication(UserDetails details,
org.springframework.security.core.Authentication authentication)
Creates a successful
Authentication object. |
abstract String |
getIdentifier() |
abstract List<InvitationField> |
getInvitationFields() |
protected abstract UserDetails |
handleRetrieveUserDetails(org.springframework.security.core.Authentication authentication)
Tries to retrieve user details using the passed authentication.
|
abstract UserVO |
queryUser(Map<InvitationField,String> queryData)
Queries a user and returns the user data
|
UserDetails |
retrieveAndAuthenticateUserDetails(org.springframework.security.core.Authentication authentication)
Uses the passed authentication to retrieve and authenticate the user Details.
|
abstract boolean |
supportsUserQuerying()
Checks if the provider is enabled and configured for user querying
|
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
authenticate
in interface org.springframework.security.authentication.AuthenticationProvider
org.springframework.security.core.AuthenticationException
protected abstract org.springframework.security.core.Authentication createSuccessAuthentication(UserDetails details, org.springframework.security.core.Authentication authentication)
Authentication
object. Subclasses will usually store the
original credentials the user supplied (not salted or encoded passwords) in the returned
Authentication object.details
- the authenticated user details. Subclasses should store it as principal in the
authentication object.authentication
- that was presented to the provider for validationpublic abstract String getIdentifier()
public abstract List<InvitationField> getInvitationFields()
protected abstract UserDetails handleRetrieveUserDetails(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
authentication
- describes the user to retrieveorg.springframework.security.core.AuthenticationException
- in case there is no user for the passed authenticationpublic abstract UserVO queryUser(Map<InvitationField,String> queryData)
queryData
- the data to use for query. See InvitationField
for possible values. The
fields this provider uses are defined by getInvitationFields()
org.springframework.security.core.AuthenticationException
public UserDetails retrieveAndAuthenticateUserDetails(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
handleRetrieveUserDetails(Authentication)
method to provide an
appropriate implementation for user retrieval. In case the user cannot be authenticated an
exception is thrown.authentication
- the appropriate authenticationorg.springframework.security.core.AuthenticationException
- in case the user cannot be authenticatedpublic abstract boolean supportsUserQuerying()
Copyright © 2019 Communote team. All rights reserved.