Class LoginConfig


  • public class LoginConfig
    extends Object
    The class configures the authentication related parameters like, authentication method, form login configuration, if authentication method is form based authentication, the realm name and the realm type.

    Usage example:

          FormLoginConfig form = new FormLoginConfig("login.html", "error.html");
    
          LoginConfig loginConfig = new LoginConfig();
          loginConfig.setAuthMethod(AuthMethod.FORM);
          loginConfig.setRealmName("userauth");
          loginConfig.setFormLoginConfig(form);
     
    Author:
    Rajiv Mordani, Amy Roh
    See Also:
    SecurityConfig
    • Constructor Detail

      • LoginConfig

        public LoginConfig()
    • Method Detail

      • setAuthMethod

        public void setAuthMethod​(AuthMethod authMethod)
        Set the authentication scheme to be used for a given context
        Parameters:
        authMethod - one of the supported auth methods as defined in AuthMethod enumeration
      • getAuthMethod

        public AuthMethod getAuthMethod()
        Gets the auth method for the context
        Returns:
        the authmethod for the context
      • setRealmName

        public void setRealmName​(String realmName)
        Sets the realm name to be used for the context
        Parameters:
        realmName - the realm name for the context
      • getRealmName

        public String getRealmName()
        Gets the realm name set for the context
        Returns:
        the realm name for the context
      • setFormLoginConfig

        public void setFormLoginConfig​(FormLoginConfig flc)
        Set the form login configuration, if the authentication method is form based authentication
        Parameters:
        flc - form login configuration
        See Also:
        FormLoginConfig
      • getFormLoginConfig

        public FormLoginConfig getFormLoginConfig()
        Gets the form login config, or null if the authentication scheme is not form based login.
        Returns:
        form login configuration
        See Also:
        FormLoginConfig
      • toString

        public String toString()
        Returns a formatted string of the state.
        Overrides:
        toString in class Object