Class NestedCredentialHandler

  • All Implemented Interfaces:
    CredentialHandler

    public class NestedCredentialHandler
    extends java.lang.Object
    implements CredentialHandler
    Nested credential handler that delegates to multiple handlers.
    • Constructor Detail

      • NestedCredentialHandler

        public NestedCredentialHandler()
        Default constructor.
    • Method Detail

      • matches

        public boolean matches​(java.lang.String inputCredentials,
                               java.lang.String storedCredentials)
        Description copied from interface: CredentialHandler
        Checks to see if the input credentials match the stored credentials
        Specified by:
        matches in interface CredentialHandler
        Parameters:
        inputCredentials - User provided credentials
        storedCredentials - Credentials stored in the Realm
        Returns:
        true if the inputCredentials match the storedCredentials, otherwise false
      • mutate

        public java.lang.String mutate​(java.lang.String inputCredentials)
        Delegates to the first nested CredentialHandler's mutate() method. Returns null if no nested handlers are configured, or if the first handler's mutate() returns null.
        Specified by:
        mutate in interface CredentialHandler
        Parameters:
        inputCredentials - User provided credentials
        Returns:
        The equivalent stored credentials for the given input credentials
      • addCredentialHandler

        public void addCredentialHandler​(CredentialHandler handler)
        Add a credential handler.
        Parameters:
        handler - the handler to add
      • getCredentialHandlers

        public CredentialHandler[] getCredentialHandlers()
        Get the credential handlers.
        Returns:
        the credential handlers