FileDocCategorySizeDatePackage
NonLoginAuthenticator.javaAPI DocGlassfish v2 API4935Fri May 04 22:31:54 BST 2007org.apache.catalina.authenticator

NonLoginAuthenticator

public final class NonLoginAuthenticator extends AuthenticatorBase
An Authenticator and Valve implementation that checks only security constraints not involving user authentication.
author
Craig R. McClanahan
version
$Revision: 1.5 $ $Date: 2007/05/05 05:31:53 $

Fields Summary
private static final String
NONLOGIN_PRINCIPAL_NAME
Principal name of nonlogin principal.
private final org.apache.catalina.realm.GenericPrincipal
NONLOGIN_PRINCIPAL
A dummy principal that is set to request in authenticate method.
private static final String
info
Descriptive information about this implementation.
Constructors Summary
Methods Summary
public booleanauthenticate(org.apache.catalina.HttpRequest request, org.apache.catalina.HttpResponse response, org.apache.catalina.deploy.LoginConfig config)
Authenticate the user making this request, based on the specified login configuration. Return true if any specified constraint has been satisfied, or false if we have created a response challenge already.

param
request Request we are processing
param
response Response we are creating
param
login Login configuration describing how authentication should be performed
exception
IOException if an input/output error occurs


        if (debug >= 1)
            log("User authentication is not required");
        
        //START SJSAS 6202703
        HttpServletRequest hreq = (HttpServletRequest) request.getRequest();
        if (hreq.getUserPrincipal() == null) {
            request.setUserPrincipal(NONLOGIN_PRINCIPAL);
        }
        //END SJSAS 6202703
        return (true);


    
public java.lang.StringgetInfo()
Return descriptive information about this Valve implementation.



    // ------------------------------------------------------------- Properties


                
       

        return (this.info);