org.restlet.ext.gae
Class GaeAuthenticator
java.lang.Object
org.restlet.Restlet
org.restlet.routing.Filter
org.restlet.security.Authenticator
org.restlet.ext.gae.GaeAuthenticator
- All Implemented Interfaces:
- Uniform
public class GaeAuthenticator
- extends Authenticator
Authenticator that provides an integration to the Google App Engine
UserService.
- Author:
- Matt Kennedy
Method Summary |
protected boolean |
authenticate(Request request,
Response response)
Integrates with Google App Engine UserService to redirect
non-authenticated users to the GAE login URL. |
Methods inherited from class org.restlet.Restlet |
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner |
GaeAuthenticator
public GaeAuthenticator(Context context)
- Constructor setting the mode to "required".
- Parameters:
context
- The context.- See Also:
#Authenticator(Context)
GaeAuthenticator
public GaeAuthenticator(Context context,
boolean optional)
- Constructor using the context's default enroler.
- Parameters:
context
- The context.optional
- The authentication mode.- See Also:
#Authenticator(Context, boolean, Enroler)
GaeAuthenticator
public GaeAuthenticator(Context context,
boolean optional,
Enroler enroler)
- Constructor.
- Parameters:
context
- The context.optional
- The authentication mode.enroler
- The enroler to invoke upon successful authentication.
authenticate
protected boolean authenticate(Request request,
Response response)
- Integrates with Google App Engine UserService to redirect
non-authenticated users to the GAE login URL. Upon successful login,
creates a Restlet User object based values in GAE user object. The GAE
"nickname" property gets mapped to the Restlet "firstName" property.
- Specified by:
authenticate
in class Authenticator
- Parameters:
request
- The request sent.response
- The response to update.
- Returns:
- True if the authentication succeeded.
Copyright © 2005-2014 Restlet.