|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AuthenticationController
Implementations of the AuthenticationController interface contain all the logic for processing token based authentification. A token is an encoded unique String value passed back to the client if successfully authenticated. Clients provide account name, password, the requested service and the name of the application used for accessing the the gdata service.
The algorithmn to create and reauthenticate the token can be choosen by the
implementor.
This interface extends
ServerComponent
e.g.
implementing classes can be registered as a
Component
in the
GDataServerRegistry
to be
accessed via the provided lookup service
BlowfishAuthenticationController
Field Summary | |
---|---|
static String |
ACCOUNT_PARAMETER
Authentication parameter for the account name. |
static String |
APPLICATION_PARAMETER
Authentication parameter for the application name of the clients application. |
static String |
AUTHORIZATION_HEADER
The header name containing the authentication token provided by the client |
static String |
PASSWORD_PARAMETER
Authentication parameter for the account password. |
static String |
SERVICE_PARAMETER
Authentication parameter for the requested service. |
static String |
TOKEN_KEY
The key used for respond the auth token to the client. |
Method Summary | |
---|---|
String |
authenticatAccount(GDataAccount account,
String requestIp)
Creates a authentication token for the given account. |
boolean |
authenticateToken(String token,
String requestIp,
GDataAccount.AccountRole role,
String accountName)
Authenticates the given auth token and checks the given parameter for matching the information contained inside the token. |
Methods inherited from interface org.apache.lucene.gdata.server.registry.ServerComponent |
---|
destroy, initialize |
Field Detail |
---|
static final String AUTHORIZATION_HEADER
static final String ACCOUNT_PARAMETER
static final String PASSWORD_PARAMETER
static final String SERVICE_PARAMETER
static final String APPLICATION_PARAMETER
static final String TOKEN_KEY
Method Detail |
---|
String authenticatAccount(GDataAccount account, String requestIp)
account
- -
the account to create the token forrequestIp
- -
the clients request ip address
boolean authenticateToken(String token, String requestIp, GDataAccount.AccountRole role, String accountName)
if the given account name is null
the authentication will
ignore the account name and the decision whether the token is valid or
not will be based on the given role compared to the role inside the token
token
- -
the token to authenticaterequestIp
- -
the client request IP addressrole
- -
the required roleaccountName
- -
the name of the account
true
if the given values match the values inside
the token and if the timestamp plus the configured timeout is
greater than the current time, if one of the values does not
match or the token has timed out it will return
false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |