@FunctionalInterface public interface JwtEncoder
JWTs may be represented using the JWS Compact Serialization format for a JSON Web Signature (JWS) structure or JWE Compact Serialization format for a JSON Web Encryption (JWE) structure. Therefore, implementors are responsible for signing a JWS and/or encrypting a JWE.
Jwt
, JoseHeader
, JwtClaimsSet
, JwtDecoder
, JSON Web Token (JWT), JSON Web Signature (JWS), JSON Web Encryption (JWE), JWS Compact Serialization, JWE Compact SerializationModifier and Type | Method and Description |
---|---|
Jwt | encode(JoseHeader headers, JwtClaimsSet claims) Encode the JWT to it's compact claims representation format. |
Jwt encode(JoseHeader headers, JwtClaimsSet claims) throws JwtEncodingException
headers
- the JOSE headerclaims
- the JWT Claims SetJwt
JwtEncodingException
- if an error occurs while attempting to encode the JWT