Interface IAuthCredentialToSubjectResolverSPI
-
@IsSPIInterface public interface IAuthCredentialToSubjectResolverSPIThis interface needs to be implemented by all classes that are used for resolving credentials to a certain subject.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IAuthSubjectgetSubjectFromCredentials(IAuthCredentials aCredentials)This method is only called ifsupportsCredentials(IAuthCredentials)returnedtrue.booleansupportsCredentials(IAuthCredentials aCredentials)Check if this class can handle the passed credential implementation.
-
-
-
Method Detail
-
supportsCredentials
boolean supportsCredentials(@Nonnull IAuthCredentials aCredentials)
Check if this class can handle the passed credential implementation.- Parameters:
aCredentials- The credentials to be validated. Nevernull.- Returns:
trueif this class can handle the given credentials,falseotherwise.
-
getSubjectFromCredentials
@Nullable IAuthSubject getSubjectFromCredentials(@Nonnull IAuthCredentials aCredentials)
This method is only called ifsupportsCredentials(IAuthCredentials)returnedtrue. It should try to resolve the credentials to anIAuthSubject. If resolving fails, no exception should be thrown, butnullshould be returned.- Parameters:
aCredentials- The credentials to be resolved to a subject. Nevernull.- Returns:
nullif the credentials could not be resolved, the subject otherwise.
-
-