Package com.adobe.granite.auth.oauth
Interface CredentialsValidator
-
@ConsumerType public interface CredentialsValidatorThis interface is intended to be implemented by an application which wants to customize the validation of the users based on their credential.
A
CredentialsValidatoris passed toProviderproviders ifProvider.getId()equalsgetId()orgetId()is equals toALL_ID-
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALL_IDId used to register a validator to all providersstatic java.lang.StringFAILED_VALIDATION_REASONCredentials Attribute Id used to store the reason why it is not considered valid
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetId()Provider identifier used to map this credential validator to it.booleanvalidate(org.apache.jackrabbit.oak.spi.security.authentication.credentials.AbstractCredentials credentials)Check the validity of a user credential.
-
-
-
Field Detail
-
ALL_ID
static final java.lang.String ALL_ID
Id used to register a validator to all providers- See Also:
- Constant Field Values
-
FAILED_VALIDATION_REASON
static final java.lang.String FAILED_VALIDATION_REASON
Credentials Attribute Id used to store the reason why it is not considered valid
-
-
Method Detail
-
validate
boolean validate(org.apache.jackrabbit.oak.spi.security.authentication.credentials.AbstractCredentials credentials) throws javax.security.auth.login.LoginExceptionCheck the validity of a user credential. If the user credential is not valid, an optional credential attribute is stored with key @{code- Parameters:
credentials- the nonnullcredential- Returns:
trueif the credential is valid ;falseotherwise- Throws:
javax.security.auth.login.LoginException- if the user could not be authenticated
-
getId
java.lang.String getId()
Provider identifier used to map this credential validator to it.- Returns:
- the provider identifier to map this credentials validator to it or ALL_ID if applies to every provider.
-
-