public abstract class JwtMacKey extends Key
JwtMac
interface).| Constructor and Description |
|---|
JwtMacKey() |
| Modifier and Type | Method and Description |
|---|---|
abstract Optional<String> |
getKid()
Returns the "kid" to be used for this key (https://www.rfc-editor.org/rfc/rfc7517#section-4.5).
|
abstract JwtMacParameters |
getParameters()
Returns a
Parameters object containing all the information about the key which is not
randomly chosen. |
equalsKey, getIdRequirementOrNullpublic abstract Optional<String> getKid()
Note that the "kid" is not necessarily related to Tink's "Key ID" in the keyset.
If present, this kid will be written into the kid header during computeMacAndEncode. If absent, no kid will be written.
If present, and the kid header is present, the contents of the kid header
needs to match the return value of this function.
Note that getParameters.allowKidAbsent() specifies if omitting the kid
header is allowed. Of course, if getParameters.allowKidAbsent() is false, then getKid must not return an empty Optional.
public abstract JwtMacParameters getParameters()
KeyParameters object containing all the information about the key which is not
randomly chosen.
Implementations need to ensure that getParameters().hasIdRequirement() returns true
if and only if getIdRequirementOrNull is non-null.
getParameters in class Key