| java.lang.Object com.noelios.restlet.util.SecurityUtils
SecurityUtils | public class SecurityUtils (Code) | | Security data manipulation utilities.
author: Jerome Louvel (contact@noelios.com) |
Method Summary | |
public static String | format(ChallengeRequest request) Formats a challenge request as a HTTP header value.
Parameters: request - The challenge request to format. | public static String | format(ChallengeResponse challenge, Request request, Series<Parameter> httpHeaders) Formats a challenge response as raw credentials.
Parameters: challenge - The challenge response to format. Parameters: request - The parent request. Parameters: httpHeaders - The current request HTTP headers. | public static ChallengeRequest | parseRequest(String header) Parses an authenticate header into a challenge request.
Parameters: header - The HTTP header value to parse. | public static ChallengeResponse | parseResponse(Request request, Logger logger, String header) Parses an authorization header into a challenge response.
Parameters: request - The request. Parameters: logger - The logger to use. Parameters: header - The header value to parse. | public static byte[] | toHMac(String source, String secretKey) Converts a source string to its HMAC/SHA-1 value.
Parameters: source - The source string to convert. Parameters: secretKey - The secret key to use for conversion. |
format | public static String format(ChallengeRequest request)(Code) | | Formats a challenge request as a HTTP header value.
Parameters: request - The challenge request to format. The authenticate header value. |
format | public static String format(ChallengeResponse challenge, Request request, Series<Parameter> httpHeaders)(Code) | | Formats a challenge response as raw credentials.
Parameters: challenge - The challenge response to format. Parameters: request - The parent request. Parameters: httpHeaders - The current request HTTP headers. The authorization header value. |
parseRequest | public static ChallengeRequest parseRequest(String header)(Code) | | Parses an authenticate header into a challenge request.
Parameters: header - The HTTP header value to parse. The parsed challenge request. |
parseResponse | public static ChallengeResponse parseResponse(Request request, Logger logger, String header)(Code) | | Parses an authorization header into a challenge response.
Parameters: request - The request. Parameters: logger - The logger to use. Parameters: header - The header value to parse. The parsed challenge response. |
toHMac | public static byte[] toHMac(String source, String secretKey)(Code) | | Converts a source string to its HMAC/SHA-1 value.
Parameters: source - The source string to convert. Parameters: secretKey - The secret key to use for conversion. The HMac value of the source string. |
|
|