Class SignatureMetadataParameters
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,Object> SequencedMap<String,Object>
HTTP Signature Metadata Parameters.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String"alg": Explicitly declared signature algorithm.static final String"created": Timestamp of signature creation.static final String"expires": Timestamp of proposed signature expiration.static final String"keyid": Key identifier for the signing and verification keys used to create this signature.static final String"nonce": A single-use nonce value.static final String"tag": An application-specific tag for a signature. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAlg()Get the value of thealgparameter.Get the value of thecreatedparameter.Get the value of theexpiresparameter.getKeyid()Get the value of thekeyidparameter.getNonce()Get the value of thenonceparameter.getTag()Get the value of thetagparameter.Serialize the parameters represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and return the resulting string.Serialize the parameters represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and write the resulting string into the specified string builder.Set the value of thealgparameter.setCreated(Long created) Set the value of thecreatedparameter.setCreated(Instant created) Set the value of thecreatedparameter.setExpires(Long expires) Set the value of theexpiresparameter.setExpires(Instant expires) Set the value of theexpiresparameter.Set the value of thekeyidparameter.Set the value of thenonceparameter.Set the value of thetagparameter.toString()Get the string representation of this instance, which is the serialized parameters returned by theserialize()method.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Field Details
-
ALG
-
CREATED
-
EXPIRES
-
KEYID
"keyid": Key identifier for the signing and verification keys used to create this signature.- See Also:
-
NONCE
-
TAG
-
-
Constructor Details
-
SignatureMetadataParameters
public SignatureMetadataParameters()The default constructor.
-
-
Method Details
-
getAlg
Get the value of thealgparameter.- Returns:
- The value of the
algparameter. This can be null. - Throws:
IllegalStateException- The parameter value identified by the key"alg"is not null, but it is not an instance ofString.
-
setAlg
Set the value of thealgparameter.- Parameters:
alg- The value of thealgparameter.- Returns:
thisobject.
-
getCreated
Get the value of thecreatedparameter.- Returns:
- The value of the
createdparameter. This can be null. - Throws:
IllegalStateException- The parameter value identified by the key"created"is not null, but it is neither aLonginstance nor anIntegerinstance. Or the number represented by the value is outside the valid range for 'seconds since the Unix epoch'.
-
setCreated
Set the value of thecreatedparameter.- Parameters:
created- The value of thecreatedparameter.- Returns:
thisobject.
-
setCreated
Set the value of thecreatedparameter.- Parameters:
created- The value of thecreatedparameter.- Returns:
thisobject.
-
getExpires
Get the value of theexpiresparameter.- Returns:
- The value of the
expiresparameter. This can be null. - Throws:
IllegalStateException- The parameter value identified by the key"expires"is not null, but it is neither aLonginstance nor anIntegerinstance. Or the number represented by the value is outside the valid range for 'seconds since the Unix epoch'.
-
setExpires
Set the value of theexpiresparameter.- Parameters:
expires- The value of theexpiresparameter.- Returns:
thisobject.
-
setExpires
Set the value of theexpiresparameter.- Parameters:
expires- The value of theexpiresparameter.- Returns:
thisobject.
-
getKeyid
Get the value of thekeyidparameter.- Returns:
- The value of the
keyidparameter. This can be null. - Throws:
IllegalStateException- The parameter value identified by the key"keyid"is not null, but it is not an instance ofString.
-
setKeyid
Set the value of thekeyidparameter.- Parameters:
keyid- The value of thekeyidparameter.- Returns:
thisobject.
-
getNonce
Get the value of thenonceparameter.- Returns:
- The value of the
nonceparameter. This can be null. - Throws:
IllegalStateException- The parameter value identified by the key"nonce"is not null, but it is not an instance ofString.
-
setNonce
Set the value of thenonceparameter.- Parameters:
nonce- The value of thenonceparameter.- Returns:
thisobject.
-
getTag
Get the value of thetagparameter.- Returns:
- The value of the
tagparameter. This can be null. - Throws:
IllegalStateException- The parameter value identified by the key"tag"is not null, but it is not an instance ofString.
-
setTag
Set the value of thetagparameter.- Parameters:
tag- The value of thetagparameter.- Returns:
thisobject.
-
toString
Get the string representation of this instance, which is the serialized parameters returned by theserialize()method.- Overrides:
toStringin classAbstractMap<String,Object> - Returns:
- The string representation of this instance.
-
serialize
Serialize the parameters represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and return the resulting string.- Returns:
- The serialized parameters represented by this instance.
-
serializeTo
Serialize the parameters represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and write the resulting string into the specified string builder.The ABNF for Parameters from RFC 8941 Structured Field Values for HTTP, 3.1.2. Parameters:
parameters = *( ";" *SP parameter ) parameter = param-key [ "=" param-value ] param-key = key key = ( lcalpha / "*" ) *( lcalpha / DIGIT / "_" / "-" / "." / "*" ) lcalpha = %x61-7A ; a-z param-value = bare-item- Parameters:
sb- A string builder into which the resulting string is written.- Returns:
- The same string builder that was passed as the argument.
-