Package org.tomitribe.auth.signatures
Enum Signatures
- java.lang.Object
-
- java.lang.Enum<Signatures>
-
- org.tomitribe.auth.signatures.Signatures
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Signatures>
public enum Signatures extends java.lang.Enum<Signatures>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringcreateSigningString(java.util.List<java.lang.String> required, java.lang.String method, java.lang.String uri, java.util.Map<java.lang.String,java.lang.String> headers)Create a canonicalized string representation of the HTTP request.static java.lang.StringcreateSigningString(java.util.List<java.lang.String> required, java.lang.String method, java.lang.String uri, java.util.Map<java.lang.String,java.lang.String> headers, java.lang.Long signatureCreationTime, java.lang.Long signatureExpiryTime)Create a canonicalized string representation of the HTTP request.static SignaturesvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Signatures[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static Signatures[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Signatures c : Signatures.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Signatures valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
createSigningString
public static java.lang.String createSigningString(java.util.List<java.lang.String> required, java.lang.String method, java.lang.String uri, java.util.Map<java.lang.String,java.lang.String> headers)Create a canonicalized string representation of the HTTP request. It is used as the input to calculate the signature of the HTTP request.- Parameters:
required- The list of headers that should be included in the HTTP signature.method- The HTTP method.uri- The HTTP request URI.headers- A map of header names to header values.
-
createSigningString
public static java.lang.String createSigningString(java.util.List<java.lang.String> required, java.lang.String method, java.lang.String uri, java.util.Map<java.lang.String,java.lang.String> headers, java.lang.Long signatureCreationTime, java.lang.Long signatureExpiryTime)Create a canonicalized string representation of the HTTP request. It is used as the input to calculate the signature of the HTTP request. The provided method, path and query values are used to generate the optional (request-target) field.- Parameters:
required- The list of headers that should be included in the HTTP signature.method- The HTTP method.uri- The path and query of the request target of the message. The value must already be encoded exactly as it will be sent in the request line of the HTTP message. No URL encoding is performed by this method.headers- A map of header names to header values.signatureCreationTime- The signature creation time in milliseconds since the epoch.signatureExpiryTime- The signature expiration time in milliseconds since the epoch.
-
-