|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.noelios.restlet.authentication.AuthenticationUtils
public class AuthenticationUtils
Authentication utilities.
| Constructor Summary | |
|---|---|
AuthenticationUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
anyNull(Object... objects)
Indicates if any of the objects is null. |
static int |
authenticate(Request request,
Guard guard)
Indicates if the request is properly authenticated. |
static void |
challenge(Response response,
boolean stale,
Guard guard)
Challenges the client by adding a challenge request to the response and by setting the status to CLIENT_ERROR_UNAUTHORIZED. |
static String |
format(ChallengeRequest request)
Formats a challenge request as a HTTP header value. |
static String |
format(ChallengeResponse challenge,
Request request,
Series<Parameter> httpHeaders)
Formats a challenge response as raw credentials. |
static ChallengeRequest |
parseAuthenticateHeader(String header)
Parses an authenticate header into a challenge request. |
static ChallengeResponse |
parseAuthorizationHeader(Request request,
String header)
Parses an authorization header into a challenge response. |
static void |
parseParameters(String paramString,
Series<Parameter> parameters)
Parsed the parameters of a credientials string and updates the series of parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthenticationUtils()
| Method Detail |
|---|
public static boolean anyNull(Object... objects)
objects - The objects to test.
public static int authenticate(Request request,
Guard guard)
request - The request to authenticate.guard - The associated guard to callback.
Guard.checkSecret(Request, String, char[])
public static void challenge(Response response,
boolean stale,
Guard guard)
response - The response to update.stale - Indicates if the new challenge is due to a stale response.guard - The associated guard to callback.public static String format(ChallengeRequest request)
request - The challenge request to format.
public static String format(ChallengeResponse challenge,
Request request,
Series<Parameter> httpHeaders)
challenge - The challenge response to format.request - The parent request.httpHeaders - The current request HTTP headers.
public static ChallengeRequest parseAuthenticateHeader(String header)
header - The HTTP header value to parse.
public static ChallengeResponse parseAuthorizationHeader(Request request,
String header)
request - The request.header - The header value to parse.
public static void parseParameters(String paramString,
Series<Parameter> parameters)
paramString - The parameters string to parse.parameters - The series to update.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||