LoginConfigpublic class LoginConfig extends Object implements SerializableRepresentation of a login configuration element for a web application,
as represented in a <login-config> element in the
deployment descriptor. |
Fields Summary |
---|
private String | authMethodThe authentication method to use for application login. Must be
BASIC, DIGEST, FORM, or CLIENT-CERT. | private String | errorPageThe context-relative URI of the error page for form login. | private String | loginPageThe context-relative URI of the login page for form login. | private String | realmNameThe 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.
super();
setAuthMethod(authMethod);
setRealmName(realmName);
setLoginPage(loginPage);
setErrorPage(errorPage);
|
Methods Summary |
---|
public java.lang.String | getAuthMethod()
return (this.authMethod);
| public java.lang.String | getErrorPage()
return (this.errorPage);
| public java.lang.String | getLoginPage()
return (this.loginPage);
| public java.lang.String | getRealmName()
return (this.realmName);
| public void | setAuthMethod(java.lang.String authMethod)
this.authMethod = authMethod;
| public void | setErrorPage(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 void | setLoginPage(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 void | setRealmName(java.lang.String realmName)
this.realmName = realmName;
| public java.lang.String | toString()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());
|
|