org.apache.lucene.gdata.servlet.handler
Class RequestAuthenticator
java.lang.Object
org.apache.lucene.gdata.servlet.handler.RequestAuthenticator
- All Implemented Interfaces:
- GDataHttpAuthenticator
- Direct Known Subclasses:
- AbstractAccountHandler, AbstractFeedHandler, AbstractGdataRequestHandler
public class RequestAuthenticator
- extends Object
- implements GDataHttpAuthenticator
The RequestAuthenticator provides access to the registered
AuthenticationController
as a super class for all request handler requiereing authentication for
access. This class implements the
GDataHttpAuthenticator
to get the auth token from the given request and call the needed Components
to authenticat the client.
For request handler handling common requests like entry insert or update the
authentication will be based on the account name verified as the owner of the
feed to alter. If the accountname in the token does not match the name of the
account which belongs to the feed the given role will be used for
autentication. Authentication using the
RequestAuthenticator#authenticateAccount(HttpServletRequest, AccountRole)
method, the account name will be ignored, authentication will be based on the
given AccountRole
- Author:
- Simon Willnauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestAuthenticator
public RequestAuthenticator()
authenticateAccount
public boolean authenticateAccount(GDataRequest request,
GDataAccount.AccountRole role)
- Description copied from interface:
GDataHttpAuthenticator
- Authenticates the client request based on the given GdataRequst and required account role
- Specified by:
authenticateAccount
in interface GDataHttpAuthenticator
- Parameters:
request
- - the gdata requestrole
- - the required role for passing the authentication
- Returns:
true
if the request successfully authenticates, otherwise false
- See Also:
GDataHttpAuthenticator.authenticateAccount(org.apache.lucene.gdata.server.GDataRequest,
org.apache.lucene.gdata.data.GDataAccount.AccountRole)
authenticateAccount
public boolean authenticateAccount(javax.servlet.http.HttpServletRequest request,
GDataAccount.AccountRole role)
- Description copied from interface:
GDataHttpAuthenticator
- Authenticates the client request based on the given requst and required account role
- Specified by:
authenticateAccount
in interface GDataHttpAuthenticator
- Parameters:
request
- - the client requestrole
- - the required role for passing the authentication
- Returns:
true
if the request successfully authenticates, otherwise false
- See Also:
GDataHttpAuthenticator.authenticateAccount(javax.servlet.http.HttpServletRequest,
org.apache.lucene.gdata.data.GDataAccount.AccountRole)
getTokenFromRequest
protected String getTokenFromRequest(javax.servlet.http.HttpServletRequest request)
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.