Package com.google.crypto.tink.jwt
Class JwtRsaSsaPssParameters.KidStrategy
- java.lang.Object
-
- com.google.crypto.tink.jwt.JwtRsaSsaPssParameters.KidStrategy
-
- Enclosing class:
- JwtRsaSsaPssParameters
@Immutable public static final class JwtRsaSsaPssParameters.KidStrategy extends java.lang.ObjectSpecifies how the "kid" header is handled.
-
-
Field Summary
Fields Modifier and Type Field Description static JwtRsaSsaPssParameters.KidStrategyBASE64_ENCODED_KEY_IDThe "kid" is the URL safe (RFC 4648 Section 5) base64-encoded big-endian key_id in the keyset.static JwtRsaSsaPssParameters.KidStrategyCUSTOMThe "kid" is fixed.static JwtRsaSsaPssParameters.KidStrategyIGNOREDThe "kid" header is ignored.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()
-
-
-
Field Detail
-
BASE64_ENCODED_KEY_ID
public static final JwtRsaSsaPssParameters.KidStrategy BASE64_ENCODED_KEY_ID
The "kid" is the URL safe (RFC 4648 Section 5) base64-encoded big-endian key_id in the keyset.In
PublicKeySign#signAndEncodeTink always adds the KID.In
PublicKeyVerify#verifyAndDecodeTink checks that the kid is present and equal to this value.This strategy is recommended by Tink.
-
IGNORED
public static final JwtRsaSsaPssParameters.KidStrategy IGNORED
The "kid" header is ignored.In
PublicKeySign#signAndEncodeTink does not write a "kid" header.In
PublicKeyVerify#verifyAndDecodeTink ignores the "kid" header.
-
CUSTOM
public static final JwtRsaSsaPssParameters.KidStrategy CUSTOM
The "kid" is fixed. It can be obtained fromparameters.getCustomKid().In
PublicKeySign#signAndEncodeTink writes the "kid" header to the value given byparameters.getCustomKid().In
PublicKeyVerify#verifyAndDecode, if the kid is present, it needs to matchparameters.getCustomKid(). If the kid is absent, it will be accepted.Note: Tink does not allow to randomly generate new
JwtRsaSsaPssKeyobjects from parameters objects withKidStrategyequals toCUSTOM.
-
-