FileDocCategorySizeDatePackage
LoginConfigurationImpl.javaAPI DocGlassfish v2 API6111Fri May 04 22:31:22 BST 2007None

LoginConfigurationImpl

public class LoginConfigurationImpl extends Descriptor implements com.sun.enterprise.deployment.web.LoginConfiguration
I dictate how the web app I belong to should be logged into.
author
Danny Coward

Fields Summary
public static final String
AUTHENTICATION_METHOD_BASIC
teh client authenticates using http basic authentication.
public static final String
AUTHENTICATION_METHOD_DIGEST
Digest authentication.
public static final String
AUTHENTICATION_METHOD_FORM
FOrm authentication.
public static final String
AUTHENTICATION_METHOD_CLIENT_CERTIFICATE
The client sends a certificate.
static Logger
_logger
private String
authenticationMethod
private String
realmName
private String
formLoginPage
private String
formErrorPage
private static com.sun.enterprise.util.LocalStringManagerImpl
localStrings
Constructors Summary
Methods Summary
public java.lang.StringgetAuthenticationMethod()
Return my authentication method.


         
       
	if (this.authenticationMethod == null) {
            //START OF IASRI 4660482 - warning log if authentication method isn't defined in descriptor
            _logger.log(Level.WARNING,"enterprise.deployment_no_auth_method_dfnd");
            //END OF IASRI 4660482 
	    this.authenticationMethod = AUTHENTICATION_METHOD_BASIC;
	}
	return this.authenticationMethod;
    
public java.lang.StringgetFormErrorPage()
Get the name of the error page for form login.

	if (this.formErrorPage == null) {
	    this.formErrorPage = "";
	}	
	return this.formErrorPage;
    
public java.lang.StringgetFormLoginPage()
Get the name of the login page for form login.

	if (this.formLoginPage == null) {
	    this.formLoginPage = "";
	}
	return this.formLoginPage;
    
public java.lang.StringgetRealmName()
Obtain the realm the server should use for basic authentication.

	if (this.realmName == null) {
	    this.realmName = "";
	}
	return this.realmName;
    
public voidprint(java.lang.StringBuffer toStringBuffer)
My representation as a formatted String.

	toStringBuffer.append("LoginConfig:(").append(authenticationMethod).append(" ").append(
            realmName).append(" ").append(formLoginPage).append(" ").append(formErrorPage).append(")");
    
public voidsetAuthenticationMethod(java.lang.String authenticationMethod)
Sets my authentication method.

	
	if ( this.isBoundsChecking() )  {
	
	    if (!LoginConfiguration.BASIC_AUTHENTICATION.equals(authenticationMethod)
		&& !LoginConfiguration.DIGEST_AUTHENTICATION.equals(authenticationMethod)
		    && !LoginConfiguration.FORM_AUTHENTICATION.equals(authenticationMethod)
			&& !LoginConfiguration.CLIENT_CERTIFICATION_AUTHENTICATION.equals(authenticationMethod) ) {	
			    
		throw new IllegalArgumentException(localStrings.getLocalString(
									       "enterprise.deployment..exceptionauthenticationmethod",
									       "{0} is not a valid authentication method", new Object[] {authenticationMethod}));
		
	    }
	}
	this.authenticationMethod = authenticationMethod;
	
    
public voidsetFormErrorPage(java.lang.String formErrorPage)
Set the name of the error page for form login.

	this.formErrorPage = formErrorPage;
    
public voidsetFormLoginPage(java.lang.String formLoginPage)
Set the name of the login page for form login.

	this.formLoginPage = formLoginPage;
    
public voidsetRealmName(java.lang.String realmName)
Set the realm the server should use for basic authentication.

	this.realmName = realmName;