Class JwtEcdsaPublicKeyVerify
- java.lang.Object
-
- com.google.crypto.tink.jwt.subtle.JwtEcdsaPublicKeyVerify
-
- All Implemented Interfaces:
JwtPublicKeyVerify
public final class JwtEcdsaPublicKeyVerify extends java.lang.Object implements JwtPublicKeyVerify
An implementation ofJwtPublicKeyVerifyfor ECDSA.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JwtPublicKeyVerifycreate(JwtEcdsaPublicKey publicKey)VerifiedJwtverifyAndDecode(java.lang.String compact, JwtValidator validator)Verifies and decodes a JWT in the JWS compact serialization format.
-
-
-
Method Detail
-
create
public static JwtPublicKeyVerify create(JwtEcdsaPublicKey publicKey) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
verifyAndDecode
public VerifiedJwt verifyAndDecode(java.lang.String compact, JwtValidator validator) throws java.security.GeneralSecurityException
Description copied from interface:JwtPublicKeyVerifyVerifies and decodes a JWT in the JWS compact serialization format.The JWT is validated against the rules in
validator. That is, every claim invalidatormust also be present in the JWT. For example, ifvalidatorcontains anissclaim, the JWT must contain an identical claim. The JWT can contain claims that areNOTin thevalidator. However, if the JWT contains a list of audiences, the validator must also contain an audience in the list.If the JWT contains timestamp claims such as
exp,iatornbf, they will also be validated.validatorallows to set a clock skew, to deal with small clock differences among different machines.- Specified by:
verifyAndDecodein interfaceJwtPublicKeyVerify- Throws:
java.security.GeneralSecurityException- when the signature of the token could not be verified, the token contains an invalid claim or header, the token has been expired or can't be used yet
-
-