Interface JwtEncoder
- All Known Implementing Classes:
NimbusJwtEncoder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Implementations of this interface are responsible for encoding a JSON Web Token (JWT)
to it's compact claims representation format.
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.
-
Method Summary
Modifier and TypeMethodDescriptionencode
(JwtEncoderParameters parameters) Encode the JWT to it's compact claims representation format.
-
Method Details
-
encode
Encode the JWT to it's compact claims representation format.- Parameters:
parameters
- the parameters containing the JOSE header and JWT Claims Set- Returns:
- a
Jwt
- Throws:
JwtEncodingException
- if an error occurs while attempting to encode the JWT
-