Interface IdentityCredentialPersister


public interface IdentityCredentialPersister
A CredentialPersister for persisting credentials into LDAP directory. Implementations of this interface are instantiated for a specific identity, as a result all of the methods on this interface are specific to that identity.
Author:
Jan Kalina
  • Method Details

    • getCredentialPersistSupport

      boolean getCredentialPersistSupport(Class<? extends org.wildfly.security.credential.Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
      Determine whether a given credential type can be persisted by this credential persister.
      Parameters:
      credentialType - the credential type (must not be null)
      algorithmName - the credential algorithm name, if any
      parameterSpec - the algorithm parameters to match, or null if any parameters are acceptable or the credential type does not support algorithm parameters
      Returns:
      true if persisting of given credential is supported
    • persistCredential

      void persistCredential(org.wildfly.security.credential.Credential credential) throws org.wildfly.security.auth.server.RealmUnavailableException
      Store credential of identity.
      Parameters:
      credential - the credential
      Throws:
      org.wildfly.security.auth.server.RealmUnavailableException
    • clearCredentials

      void clearCredentials() throws org.wildfly.security.auth.server.RealmUnavailableException
      Clear all supported credentials of identity.
      Throws:
      org.wildfly.security.auth.server.RealmUnavailableException
    • getCredentialAcquireSupport

      org.wildfly.security.auth.SupportLevel getCredentialAcquireSupport(Class<? extends org.wildfly.security.credential.Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec, Supplier<Provider[]> providers)
      Determine whether a given credential is definitely supported, possibly supported, or definitely not supported.
      Parameters:
      credentialType - the credential type (must not be null)
      algorithmName - the credential algorithm name, if any
      parameterSpec - the algorithm parameters to match, or null if any parameters are acceptable or the credential type does not support algorithm parameters
      providers - the providers to use when checking ability to obtain the credential
      Returns:
      the level of support for this credential type
    • getCredential

      <C extends org.wildfly.security.credential.Credential> C getCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec, Supplier<Provider[]> providers)
      Acquire a credential of the given type.
      Type Parameters:
      C - the type to which should be credential casted
      Parameters:
      credentialType - the credential type (must not be null)
      algorithmName - the credential algorithm name, if any
      parameterSpec - the algorithm parameters to match, or null if any parameters are acceptable or the credential type does not support algorithm parameters
      providers - the providers to use when obtaining the credential
      Returns:
      the credential, or null if the principal has no credential of that name or cannot be casted to that type