|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.noelios.restlet.util.SecurityUtils
public class SecurityUtils
Security data manipulation utilities.
Constructor Summary | |
---|---|
SecurityUtils()
|
Method Summary | |
---|---|
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 |
parseRequest(String header)
Parses an authenticate header into a challenge request. |
static ChallengeResponse |
parseResponse(Request request,
Logger logger,
String header)
Parses an authorization header into a challenge response. |
static byte[] |
toHMac(String source,
String secretKey)
Converts a source string to its HMAC/SHA-1 value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecurityUtils()
Method Detail |
---|
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 parseRequest(String header)
header
- The HTTP header value to parse.
public static ChallengeResponse parseResponse(Request request, Logger logger, String header)
request
- The request.logger
- The logger to use.header
- The header value to parse.
public static byte[] toHMac(String source, String secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |