Class LoginContextFactory


  • public class LoginContextFactory
    extends Object
    This Factory makes Login Context objects based on whether authentication is happening in pure JAAS modules and whether there is a subject available.
    • Method Detail

      • createLoginContext

        public LoginContext createLoginContext​(AMLoginContext context,
                                               Subject subject,
                                               String configName,
                                               boolean isPureJAAS,
                                               Configuration configuration)
                                        throws LoginException
        Creates an appropriate version of a login context object based on the provided parameters
        Parameters:
        context - the AMLoginContext that is requesting a login context
        subject - the subject that is attempting to log in - may be null
        configName - the config name for the JAAS object, must not be null.
        isPureJAAS - true if there are only pure JAAS
        configuration - the authentication configuration
        Returns:
        a created login context
        Throws:
        LoginException - if the login context could not be created