Class CredentialUpdateCallback

java.lang.Object
org.wildfly.security.auth.callback.CredentialUpdateCallback
All Implemented Interfaces:
Callback, ExtendedCallback

public final class CredentialUpdateCallback extends Object implements ExtendedCallback
A callback to inform the callback handler of a credential change.
Author:
Farah Juma
  • Constructor Details

    • CredentialUpdateCallback

      public CredentialUpdateCallback(Credential credential)
      Construct a new instance.
      Parameters:
      credential - the new credential
  • Method Details

    • getCredential

      public Credential getCredential()
      Get the new credential.
      Returns:
      the new credential
    • getCredential

      public <C extends Credential> C getCredential(Class<C> credentialClass)
      Get the new credential, if it is of the given credential class.
      Type Parameters:
      C - the credential type
      Parameters:
      credentialClass - the credential class
      Returns:
      the credential, or null if it is not of the given type
    • isOptional

      public boolean isOptional()
      Description copied from interface: ExtendedCallback
      Determine if this callback is optional.
      Specified by:
      isOptional in interface ExtendedCallback
      Returns:
      true if the callback is optional, false if it is mandatory