Class JaasCredentialsValidator

  • All Implemented Interfaces:
    CredentialsValidator, Configurable

    public class JaasCredentialsValidator
    extends java.lang.Object
    implements CredentialsValidator
    Validate credentials by using standard Java Authentication and Authorization Service

    Configuration parameters:

    • appName inside the JAAS configuration (by default h2)
    • Field Detail

      • appName

        private java.lang.String appName
    • Constructor Detail

      • JaasCredentialsValidator

        public JaasCredentialsValidator()
      • JaasCredentialsValidator

        public JaasCredentialsValidator​(java.lang.String appName)
        Create the validator with the given name of JAAS configuration
        Parameters:
        appName - = name of JAAS configuration
    • Method Detail

      • configure

        public void configure​(ConfigProperties configProperties)
        Description copied from interface: Configurable
        configure the component
        Specified by:
        configure in interface Configurable
        Parameters:
        configProperties - = configuration properties
      • validateCredentials

        public boolean validateCredentials​(AuthenticationInfo authenticationInfo)
                                    throws java.lang.Exception
        Description copied from interface: CredentialsValidator
        Validate user credential.
        Specified by:
        validateCredentials in interface CredentialsValidator
        Parameters:
        authenticationInfo - = authentication info
        Returns:
        true if credentials are valid, otherwise false
        Throws:
        java.lang.Exception - any exception occurred (invalid credentials or internal issue) prevent user login