Class OtpCredentialLoader.ForIdentityLoader
- java.lang.Object
-
- org.wildfly.security.auth.realm.ldap.OtpCredentialLoader.ForIdentityLoader
-
- All Implemented Interfaces:
IdentityCredentialLoader,IdentityCredentialPersister
- Enclosing class:
- OtpCredentialLoader
private class OtpCredentialLoader.ForIdentityLoader extends Object implements IdentityCredentialPersister
-
-
Field Summary
Fields Modifier and Type Field Description private Attributesattributesprivate DirContextcontextprivate StringdistinguishedName
-
Constructor Summary
Constructors Constructor Description ForIdentityLoader(DirContext context, String distinguishedName, Attributes attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCredentials()Clear all supported credentials of identity.<C extends Credential>
CgetCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec, Supplier<Provider[]> providers)Acquire a credential of the given type.SupportLevelgetCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec, Supplier<Provider[]> providers)Determine whether a given credential is definitely supported, possibly supported, or definitely not supported.booleangetCredentialPersistSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)Determine whether a given credential type can be persisted by this credential persister.voidpersistCredential(Credential credential)Store credential of identity.
-
-
-
Field Detail
-
context
private final DirContext context
-
distinguishedName
private final String distinguishedName
-
attributes
private final Attributes attributes
-
-
Constructor Detail
-
ForIdentityLoader
public ForIdentityLoader(DirContext context, String distinguishedName, Attributes attributes)
-
-
Method Detail
-
getCredentialAcquireSupport
public SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec, Supplier<Provider[]> providers)
Description copied from interface:IdentityCredentialLoaderDetermine whether a given credential is definitely supported, possibly supported, or definitely not supported.- Specified by:
getCredentialAcquireSupportin interfaceIdentityCredentialLoader- Parameters:
credentialType- the credential type (must not benull)algorithmName- the credential algorithm name, if anyparameterSpec- the algorithm parameters to match, ornullif any parameters are acceptable or the credential type does not support algorithm parametersproviders- the providers to use when checking ability to obtain the credential- Returns:
- the level of support for this credential type
-
getCredential
public <C extends Credential> C getCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec, Supplier<Provider[]> providers)
Description copied from interface:IdentityCredentialLoaderAcquire a credential of the given type.- Specified by:
getCredentialin interfaceIdentityCredentialLoader- Type Parameters:
C- the type to which should be credential casted- Parameters:
credentialType- the credential type (must not benull)algorithmName- the credential algorithm name, if anyparameterSpec- the algorithm parameters to match, ornullif any parameters are acceptable or the credential type does not support algorithm parametersproviders- the providers to use when obtaining the credential- Returns:
- the credential, or
nullif the principal has no credential of that name or cannot be casted to that type
-
getCredentialPersistSupport
public boolean getCredentialPersistSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
Description copied from interface:IdentityCredentialPersisterDetermine whether a given credential type can be persisted by this credential persister.- Specified by:
getCredentialPersistSupportin interfaceIdentityCredentialPersister- Parameters:
credentialType- the credential type (must not benull)algorithmName- the credential algorithm name, if anyparameterSpec- the algorithm parameters to match, ornullif any parameters are acceptable or the credential type does not support algorithm parameters- Returns:
trueif persisting of given credential is supported
-
persistCredential
public void persistCredential(Credential credential) throws RealmUnavailableException
Description copied from interface:IdentityCredentialPersisterStore credential of identity.- Specified by:
persistCredentialin interfaceIdentityCredentialPersister- Parameters:
credential- the credential- Throws:
RealmUnavailableException
-
clearCredentials
public void clearCredentials() throws RealmUnavailableExceptionDescription copied from interface:IdentityCredentialPersisterClear all supported credentials of identity.- Specified by:
clearCredentialsin interfaceIdentityCredentialPersister- Throws:
RealmUnavailableException
-
-