@Deprecated public class RedirectAuthenticator extends Authenticator
Authenticator is to do remote
authentication using OpenID.
The RedirectAuthenticator has the following logic based on Verifier
returns:
Verifier.RESULT_VALID it will clean up
any unneeded cookies and do a
Response.redirectPermanent(org.restlet.data.Reference) to the
original resource
Verifier.RESULT_INVALID or
Verifier.RESULT_UNKNOWN it will clean up all cookies and call forbid
(default behavior to set Status.CLIENT_ERROR_FORBIDDEN if no
errorResource has been set)
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_IDENTIFIER_COOKIE
Deprecated.
The default name of the cookie that contains the identifier.
|
static java.lang.String |
DEFAULT_ORIGINAL_REF_COOKIE
Deprecated.
The default name of the cookie that contains the original request's
reference.
|
static java.lang.String |
ORIGINAL_REF_ATTRIBUTE
Deprecated.
|
| Constructor and Description |
|---|
RedirectAuthenticator(Context context,
Verifier verifier,
Restlet forbiddenResource)
Deprecated.
Initialize a RedirectAuthenticator with a Verifier.
|
RedirectAuthenticator(Context context,
Verifier verifier,
java.lang.String identifierCookie,
java.lang.String origRefCookie,
Restlet forbiddenResource)
Deprecated.
Initializes a RedirectAuthenticator with a Verifier.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
authenticate(Request request,
Response response)
Deprecated.
|
protected int |
authenticated(Request request,
Response response)
Deprecated.
|
static void |
clearIdentifierCookie(java.lang.String cookieId,
Request req,
Response res)
Deprecated.
|
static void |
clearIdentiiferCookie(Request req,
Response res)
Deprecated.
|
void |
forbid(java.lang.String origRef,
Request request,
Response response)
Deprecated.
Rejects the call due to a failed authentication or authorization.
|
protected void |
handleUser(User user,
boolean cached)
Deprecated.
Handles the retrieved user from the verifier.
|
protected int |
unauthenticated(Request request,
Response response)
Deprecated.
|
beforeHandle, getEnroler, isMultiAuthenticating, isOptional, setEnroler, setMultiAuthenticating, setOptionalafterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stopcreateFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwnerpublic static final java.lang.String DEFAULT_IDENTIFIER_COOKIE
public static final java.lang.String DEFAULT_ORIGINAL_REF_COOKIE
public static final java.lang.String ORIGINAL_REF_ATTRIBUTE
public RedirectAuthenticator(Context context, Verifier verifier, Restlet forbiddenResource)
context - - Contextverifier - - A Verifier that sets user identifier upon completionpublic RedirectAuthenticator(Context context, Verifier verifier, java.lang.String identifierCookie, java.lang.String origRefCookie, Restlet forbiddenResource)
context - The context.verifier - The verifier that sets user identifier upon completion.identifierCookie - The name of the cookie that contains the identifier.origRefCookie - The name of the cookie that contains the original request's
reference.forbiddenResource - The Restlet that will handle the call in case of
authentication or authorization failure.public static void clearIdentifierCookie(java.lang.String cookieId,
Request req,
Response res)
public static void clearIdentiiferCookie(Request req, Response res)
protected boolean authenticate(Request request, Response response)
authenticate in class Authenticatorprotected int authenticated(Request request, Response response)
authenticated in class Authenticatorpublic void forbid(java.lang.String origRef,
Request request,
Response response)
origRef - The original ref stored by the RedirectAuthenticatorrequest - The rejected request.response - The reject response.protected void handleUser(User user, boolean cached)
user - The user.protected int unauthenticated(Request request, Response response)
unauthenticated in class AuthenticatorCopyright © 2005-2020 Restlet.