FileDocCategorySizeDatePackage
LoginConfig.javaAPI DocGlassfish v2 API5701Fri May 04 22:32:08 BST 2007org.apache.catalina.deploy

LoginConfig

public class LoginConfig extends Object implements Serializable
Representation of a login configuration element for a web application, as represented in a <login-config> element in the deployment descriptor.
author
Craig R. McClanahan
version
$Revision: 1.3 $ $Date: 2007/05/05 05:32:08 $

Fields Summary
private String
authMethod
The authentication method to use for application login. Must be BASIC, DIGEST, FORM, or CLIENT-CERT.
private String
errorPage
The context-relative URI of the error page for form login.
private String
loginPage
The context-relative URI of the login page for form login.
private String
realmName
The realm name used when challenging the user for authentication credentials.
Constructors Summary
public LoginConfig()
Construct a new LoginConfig with default properties.


        super();

    
public LoginConfig(String authMethod, String realmName, String loginPage, String errorPage)
Construct a new LoginConfig with the specified properties.

param
authMethod The authentication method
param
realmName The realm name
param
loginPage The login page URI
param
errorPage The error page URI


        super();
        setAuthMethod(authMethod);
        setRealmName(realmName);
        setLoginPage(loginPage);
        setErrorPage(errorPage);

    
Methods Summary
public java.lang.StringgetAuthMethod()


       
        return (this.authMethod);
    
public java.lang.StringgetErrorPage()


       
        return (this.errorPage);
    
public java.lang.StringgetLoginPage()


       
        return (this.loginPage);
    
public java.lang.StringgetRealmName()


       
        return (this.realmName);
    
public voidsetAuthMethod(java.lang.String authMethod)

        this.authMethod = authMethod;
    
public voidsetErrorPage(java.lang.String errorPage)

        //        if ((errorPage == null) || !errorPage.startsWith("/"))
        //            throw new IllegalArgumentException
        //                ("Error Page resource path must start with a '/'");
        this.errorPage = RequestUtil.URLDecode(errorPage);
    
public voidsetLoginPage(java.lang.String loginPage)

        //        if ((loginPage == null) || !loginPage.startsWith("/"))
        //            throw new IllegalArgumentException
        //                ("Login Page resource path must start with a '/'");
        this.loginPage = RequestUtil.URLDecode(loginPage);
    
public voidsetRealmName(java.lang.String realmName)

        this.realmName = realmName;
    
public java.lang.StringtoString()
Return a String representation of this object.


        StringBuffer sb = new StringBuffer("LoginConfig[");
        sb.append("authMethod=");
        sb.append(authMethod);
        if (realmName != null) {
            sb.append(", realmName=");
            sb.append(realmName);
        }
        if (loginPage != null) {
            sb.append(", loginPage=");
            sb.append(loginPage);
        }
        if (errorPage != null) {
            sb.append(", errorPage=");
            sb.append(errorPage);
        }
        sb.append("]");
        return (sb.toString());