Package com.google.crypto.tink.jwt
Class JwtSignaturePublicKey
- java.lang.Object
-
- com.google.crypto.tink.Key
-
- com.google.crypto.tink.jwt.JwtSignaturePublicKey
-
- Direct Known Subclasses:
JwtEcdsaPublicKey,JwtRsaSsaPkcs1PublicKey,JwtRsaSsaPssPublicKey
public abstract class JwtSignaturePublicKey extends Key
Represents a key to verify JWT using asymmetric cryptography (i.e., using theJwtPublicKeyVerifyinterface).
-
-
Constructor Summary
Constructors Constructor Description JwtSignaturePublicKey()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.util.Optional<java.lang.String>getKid()Returns the "kid" to be used for this key (https://www.rfc-editor.org/rfc/rfc7517#section-4.5).abstract JwtSignatureParametersgetParameters()Returns the parameters of this key.-
Methods inherited from class com.google.crypto.tink.Key
equalsKey, getIdRequirementOrNull
-
-
-
-
Method Detail
-
getKid
public abstract java.util.Optional<java.lang.String> getKid()
Returns the "kid" to be used for this key (https://www.rfc-editor.org/rfc/rfc7517#section-4.5).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
kidheader duringcomputeMacAndEncode. If absent, no kid will be written.If present, and the
kidheader is present, the contents of thekidheader needs to match the return value of this function.Note that
getParameters.allowKidAbsent()specifies if omitting thekidheader is allowed. Of course, ifgetParameters.allowKidAbsent()is true, thengetKidmust not return an emptyOptional.
-
getParameters
public abstract JwtSignatureParameters getParameters()
Returns the parameters of this key.- Specified by:
getParametersin classKey
-
-