T - the type of object to return to the parser caller after handling the parsed JWT.public interface JwtHandler<T>
JwtParser after parsing a JWT to indicate the exact
type of JWT or JWS parsed.| 限定符和类型 | 方法和说明 |
|---|---|
T |
onClaimsJws(Jws<Claims> jws)
This method is invoked when a
JwtParser determines that the parsed JWT is
a valid Claims JWS. |
T |
onClaimsJwt(Jwt<Header,Claims> jwt)
This method is invoked when a
JwtParser determines that the parsed JWT is
a Claims JWT. |
T |
onPlaintextJws(Jws<java.lang.String> jws)
This method is invoked when a
JwtParser determines that the parsed JWT is
a plaintext JWS. |
T |
onPlaintextJwt(Jwt<Header,java.lang.String> jwt)
This method is invoked when a
JwtParser determines that the parsed JWT is
a plaintext JWT. |
T onPlaintextJwt(Jwt<Header,java.lang.String> jwt)
JwtParser determines that the parsed JWT is
a plaintext JWT. A plaintext JWT has a String (non-JSON) body payload and it is not cryptographically signed.jwt - the parsed plaintext JWTnull if no return value is necessary.T onClaimsJwt(Jwt<Header,Claims> jwt)
JwtParser determines that the parsed JWT is
a Claims JWT. A Claims JWT has a Claims body and it is not cryptographically signed.jwt - the parsed claims JWTnull if no return value is necessary.T onPlaintextJws(Jws<java.lang.String> jws)
JwtParser determines that the parsed JWT is
a plaintext JWS. A plaintext JWS is a JWT with a String (non-JSON) body (payload) that has been
cryptographically signed.
This method will only be invoked if the cryptographic signature can be successfully verified.
jws - the parsed plaintext JWSnull if no return value is necessary.T onClaimsJws(Jws<Claims> jws)
JwtParser determines that the parsed JWT is
a valid Claims JWS. A Claims JWS is a JWT with a Claims body that has been cryptographically signed.
This method will only be invoked if the cryptographic signature can be successfully verified.
jws - the parsed claims JWSnull if no return value is necessary.