All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.security.auth.realm.ldap.IdentityCredentialPersister Maven / Gradle / Ivy

There is a newer version: 2.4.1.Final
Show newest version
package org.wildfly.security.auth.realm.ldap;

import java.security.spec.AlgorithmParameterSpec;

import org.wildfly.security.auth.server.RealmUnavailableException;
import org.wildfly.security.credential.Credential;

/**
 * A {@link 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
 */
public interface IdentityCredentialPersister extends IdentityCredentialLoader {

    /**
     * Determine whether a given credential type can be persisted by this credential persister.
     *
     * @param credentialType the credential type (must not be {@code null})
     * @param algorithmName the credential algorithm name, if any
     * @param parameterSpec the algorithm parameters to match, or {@code null} if any parameters are acceptable or the credential type
     *  does not support algorithm parameters
     * @return {@code true} if persisting of given credential is supported
     */
    boolean getCredentialPersistSupport(Class credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec);

    /**
     * Store credential of identity.
     *
     * @param credential the credential
     */
    void persistCredential(Credential credential) throws RealmUnavailableException;

    /**
     * Clear all supported credentials of identity.
     */
    void clearCredentials() throws RealmUnavailableException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy