net.sf.jguard.jee.authentication.schemes
Class HttpServletLoginPasswordFormSchemeHandler

java.lang.Object
  extended by net.sf.jguard.core.authentication.schemes.FORMSchemeHandler<Req,Res>
      extended by net.sf.jguard.core.authentication.schemes.LoginPasswordFormSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>
          extended by net.sf.jguard.jee.authentication.schemes.HttpServletLoginPasswordFormSchemeHandler
All Implemented Interfaces:
AuthenticationSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>, StatefulAuthenticationSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>

public class HttpServletLoginPasswordFormSchemeHandler
extends LoginPasswordFormSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>

implements an HTTP FORM Authentication scheme based on an HttpServlet API.

Author:
Charles Gay

Field Summary
static String AUTHENTICATION_FAILED_URI
           
static String AUTHENTICATION_SUCCEED_URI
           
static String LOGIN_FIELD
           
static String LOGON_PROCESS_URI
           
static String PASSWORD_FIELD
           
 
Fields inherited from class net.sf.jguard.core.authentication.schemes.LoginPasswordFormSchemeHandler
LOGIN, PASSWORD
 
Fields inherited from class net.sf.jguard.core.authentication.schemes.FORMSchemeHandler
authenticationBindings, goToLastAccessDeniedUriOnSuccess
 
Fields inherited from interface net.sf.jguard.core.authentication.schemes.AuthenticationSchemeHandler
REDIRECT
 
Constructor Summary
HttpServletLoginPasswordFormSchemeHandler(Map<String,String> parameters, StatefulScopes authenticationBindings)
           
 
Method Summary
 void authenticationFailed(Request<javax.servlet.http.HttpServletRequest> req, Response<javax.servlet.http.HttpServletResponse> res)
           
 void authenticationSucceed(Subject subject, Request<javax.servlet.http.HttpServletRequest> servletRequest, Response<javax.servlet.http.HttpServletResponse> servletResponse)
          translate in the underlying technology the overall authentication success.
 void buildChallenge(Request<javax.servlet.http.HttpServletRequest> req, Response<javax.servlet.http.HttpServletResponse> res)
           
protected  String getLogin(Request<javax.servlet.http.HttpServletRequest> req)
           
 Permission getLogoffPermission()
           
 Permission getLogonPermission()
           
protected  Permission getLogonProcessPermission()
           
protected  String getPassword(Request<javax.servlet.http.HttpServletRequest> req)
           
protected  PermissionFactory<javax.servlet.http.HttpServletRequest> getPermissionFactory()
          return the PermissionFactory.
 
Methods inherited from class net.sf.jguard.core.authentication.schemes.LoginPasswordFormSchemeHandler
answerToChallenge, getName, handleSchemeCallbacks
 
Methods inherited from class net.sf.jguard.core.authentication.schemes.FORMSchemeHandler
buildGrantedPermissions, challengeNeeded, getCallbackTypes, getGrantedPermissions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGON_PROCESS_URI

public static final String LOGON_PROCESS_URI
See Also:
Constant Field Values

LOGIN_FIELD

public static final String LOGIN_FIELD
See Also:
Constant Field Values

PASSWORD_FIELD

public static final String PASSWORD_FIELD
See Also:
Constant Field Values

AUTHENTICATION_SUCCEED_URI

public static final String AUTHENTICATION_SUCCEED_URI
See Also:
Constant Field Values

AUTHENTICATION_FAILED_URI

public static final String AUTHENTICATION_FAILED_URI
See Also:
Constant Field Values
Constructor Detail

HttpServletLoginPasswordFormSchemeHandler

public HttpServletLoginPasswordFormSchemeHandler(Map<String,String> parameters,
                                                 StatefulScopes authenticationBindings)
Method Detail

getLogonProcessPermission

protected Permission getLogonProcessPermission()
Specified by:
getLogonProcessPermission in class FORMSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>
Returns:
Permission bound to the FORM target.

getLogoffPermission

public Permission getLogoffPermission()
Specified by:
getLogoffPermission in interface StatefulAuthenticationSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>
Specified by:
getLogoffPermission in class FORMSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>

getLogonPermission

public Permission getLogonPermission()
Specified by:
getLogonPermission in class FORMSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>

getPermissionFactory

protected PermissionFactory<javax.servlet.http.HttpServletRequest> getPermissionFactory()
return the PermissionFactory.

Specified by:
getPermissionFactory in class FORMSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>
Returns:

buildChallenge

public void buildChallenge(Request<javax.servlet.http.HttpServletRequest> req,
                           Response<javax.servlet.http.HttpServletResponse> res)

authenticationSucceed

public void authenticationSucceed(Subject subject,
                                  Request<javax.servlet.http.HttpServletRequest> servletRequest,
                                  Response<javax.servlet.http.HttpServletResponse> servletResponse)
translate in the underlying technology the overall authentication success.

Parameters:
subject -
servletRequest -
servletResponse -
Throws:
AuthenticationException

authenticationFailed

public void authenticationFailed(Request<javax.servlet.http.HttpServletRequest> req,
                                 Response<javax.servlet.http.HttpServletResponse> res)

getLogin

protected String getLogin(Request<javax.servlet.http.HttpServletRequest> req)
Specified by:
getLogin in class LoginPasswordFormSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>

getPassword

protected String getPassword(Request<javax.servlet.http.HttpServletRequest> req)
Specified by:
getPassword in class LoginPasswordFormSchemeHandler<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>


Copyright © 2004-2011. All Rights Reserved.