|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.security.AuthenticatorUtils
public class AuthenticatorUtils
Authentication utilities.
Method Summary | |
---|---|
static boolean |
anyNull(Object... objects)
Indicates if any of the objects is null. |
static int |
authenticate(Request request,
Guard guard)
Deprecated. See new org.restlet.security package. |
static void |
challenge(Response response,
boolean stale,
Guard guard)
Deprecated. See new org.restlet.security package. |
static String |
formatAuthenticationInfo(AuthenticationInfo info)
Formats an authentication information as a HTTP header value. |
static String |
formatNonceCount(int nonceCount)
Formats a given nonce count as a HTTP header value. |
static String |
formatRequest(ChallengeRequest challenge,
Response response,
Series<Parameter> httpHeaders)
Formats a challenge request as a HTTP header value. |
static String |
formatResponse(ChallengeResponse challenge,
Request request,
Series<Parameter> httpHeaders)
Formats a challenge response as a HTTP header value. |
static AuthenticationInfo |
parseAuthenticationInfo(String header)
Parses the "Authentication-Info" header. |
static List<ChallengeRequest> |
parseRequest(Response response,
String header,
Series<Parameter> httpHeaders)
Parses an authenticate header into a list of challenge request. |
static ChallengeResponse |
parseResponse(Request request,
String header,
Series<Parameter> httpHeaders)
Parses an authorization header into a challenge response. |
static void |
update(ChallengeResponse challengeResponse,
Request request,
Response response)
Updates a ChallengeResponse object according to given request and response. |
static void |
update(ChallengeResponse challengeResponse,
Request request,
Response response,
String identifier,
char[] baseSecret,
String baseSecretAlgorithm)
Updates a ChallengeResponse object according to given request and response and compute a new secret according to the response sent by the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean anyNull(Object... objects)
objects
- The objects to test.
@Deprecated public static int authenticate(Request request, Guard guard)
request
- The request to authenticate.guard
- The associated guard to callback.
Guard.checkSecret(Request, String, char[])
@Deprecated 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 formatAuthenticationInfo(AuthenticationInfo info)
HeaderConstants.HEADER_AUTHENTICATION_INFO
.
info
- The authentication information to format.
HeaderConstants.HEADER_AUTHENTICATION_INFO
header
value.public static String formatNonceCount(int nonceCount)
HeaderConstants.HEADER_AUTHENTICATION_INFO
.
nonceCount
- The given nonce count.
public static String formatRequest(ChallengeRequest challenge, Response response, Series<Parameter> httpHeaders)
HeaderConstants.HEADER_WWW_AUTHENTICATE
.
challenge
- The challenge request to format.response
- The parent response.httpHeaders
- The current response HTTP headers.
HeaderConstants.HEADER_WWW_AUTHENTICATE
header value.public static String formatResponse(ChallengeResponse challenge, Request request, Series<Parameter> httpHeaders)
HeaderConstants.HEADER_AUTHORIZATION
.
challenge
- The challenge response to format.request
- The parent request.httpHeaders
- The current request HTTP headers.
HeaderConstants.HEADER_AUTHORIZATION
header value.
IOException
public static AuthenticationInfo parseAuthenticationInfo(String header)
header
- The header value to parse.
AuthenticationInfo
instance.
IOException
public static List<ChallengeRequest> parseRequest(Response response, String header, Series<Parameter> httpHeaders)
HeaderConstants.HEADER_WWW_AUTHENTICATE
.
header
- The HTTP header value to parse.httpHeaders
- The current response HTTP headers.
public static ChallengeResponse parseResponse(Request request, String header, Series<Parameter> httpHeaders)
HeaderConstants.HEADER_AUTHORIZATION
.
request
- The parent request.header
- The authorization header.httpHeaders
- The current request HTTP headers.
public static void update(ChallengeResponse challengeResponse, Request request, Response response)
challengeResponse
- The challengeResponse to update.request
- The request.response
- The response.public static void update(ChallengeResponse challengeResponse, Request request, Response response, String identifier, char[] baseSecret, String baseSecretAlgorithm)
challengeResponse
- The challengeResponse to update.request
- The request if available.response
- The response if available.identifier
- The identifier.baseSecret
- The base secret used to compute the secret.baseSecretAlgorithm
- The digest algorithm of the base secret (@see Digest
class).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |