Class LoginContextFactory


  • public final class LoginContextFactory
    extends Object
    The LoginContextFactory class is the entry point for the login support for the platform. Use it to create login contexts.

    This class is not intended to be instantiated or extended by clients.

    Restriction:
    This class is not intended to be instantiated by clients.
    • Constructor Detail

      • LoginContextFactory

        public LoginContextFactory()
    • Method Detail

      • createContext

        public static ILoginContext createContext​(String configName,
                                                  URL configFile)
        Creates application-specific security context. The security context then can be used to perform login, logout, and obtain Subject information.

        Due to the way default Java Configuration is initialized, this context should be created first. If standard JAAS files are used with the standard configuration, the initialization will fail unless this context created first, prior to any calls to createContext(String).

        Parameters:
        configName - the name of login configuration to use
        configFile - points to the standard JAAS configuration file
        Returns:
        new security context
      • createContext

        public static ILoginContext createContext​(String configName,
                                                  URL configFile,
                                                  CallbackHandler handler)
        Creates application-specific security context. The security context then can be used to perform login, logout, and obtain Subject information.

        Due to the way default Java Configuration is initialized, this context should be created first. If standard JAAS files are used with the standard configuration, the initialization will fail unless this context created first, prior to any calls to createContext(String).

        Parameters:
        configName - the name of login configuration to use
        configFile - points to the standard JAAS configuration file
        handler - optional callback handler, might be null
        Returns:
        new security context
      • createContext

        public static ILoginContext createContext​(String configName)
        Creates application-specific security context. The security context then can be used to perform login, logout, and obtain Subject information.
        Parameters:
        configName - the name of login configuration to use
        Returns:
        new security context