public class DatabaseAuthenticationProvider extends BaseCommunoteAuthenticationProvider
Constructor and Description |
---|
DatabaseAuthenticationProvider()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected org.springframework.security.core.Authentication |
createSuccessAuthentication(UserDetails details,
org.springframework.security.core.Authentication authentication)
Creates a successful
Authentication object. |
String |
getIdentifier() |
List<InvitationField> |
getInvitationFields() |
protected UserDetails |
handleRetrieveUserDetails(org.springframework.security.core.Authentication auth)
Tries to retrieve user details using the passed authentication.
|
UserVO |
queryUser(Map<InvitationField,String> queryData)
Querying here means, might there be a user that exists in the universe with these data.
|
boolean |
supports(Class<?> authentication) |
boolean |
supportsUserQuerying()
Checks if the provider is enabled and configured for user querying
|
authenticate, retrieveAndAuthenticateUserDetails
public DatabaseAuthenticationProvider()
protected 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.createSuccessAuthentication
in class BaseCommunoteAuthenticationProvider
details
- the authenticated user details. Subclasses should store it as principal in the
authentication object.authentication
- that was presented to the provider for validationpublic String getIdentifier()
getIdentifier
in class BaseCommunoteAuthenticationProvider
public List<InvitationField> getInvitationFields()
getInvitationFields
in class BaseCommunoteAuthenticationProvider
protected UserDetails handleRetrieveUserDetails(org.springframework.security.core.Authentication auth) throws org.springframework.security.core.AuthenticationException
handleRetrieveUserDetails
in class BaseCommunoteAuthenticationProvider
auth
- describes the user to retrieveorg.springframework.security.core.AuthenticationException
- in case there is no user for the passed authenticationpublic UserVO queryUser(Map<InvitationField,String> queryData) throws org.springframework.security.core.AuthenticationException
queryUser
in class BaseCommunoteAuthenticationProvider
queryData
- the data to use for query. See InvitationField
for possible values. The
fields this provider uses are defined by BaseCommunoteAuthenticationProvider.getInvitationFields()
org.springframework.security.core.AuthenticationException
public boolean supports(Class<?> authentication)
public boolean supportsUserQuerying()
supportsUserQuerying
in class BaseCommunoteAuthenticationProvider
Copyright © 2019 Communote team. All rights reserved.