Class NimbusJwtEncoder
java.lang.Object
org.springframework.security.oauth2.jwt.NimbusJwtEncoder
- All Implemented Interfaces:
- JwtEncoder
An implementation of a 
JwtEncoder that encodes a JSON Web Token (JWT) using the
 JSON Web Signature (JWS) Compact Serialization format. The private/secret key used for
 signing the JWS is supplied by the com.nimbusds.jose.jwk.source.JWKSource
 provided via the constructor.
 NOTE: This implementation uses the Nimbus JOSE + JWT SDK.
- Since:
- 5.6
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionNimbusJwtEncoder(com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> jwkSource) Constructs aNimbusJwtEncoderusing the provided parameters.
- 
Method SummaryModifier and TypeMethodDescriptionencode(JwtEncoderParameters parameters) Encode the JWT to its compact claims representation format.
- 
Constructor Details- 
NimbusJwtEncoderpublic NimbusJwtEncoder(com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> jwkSource) Constructs aNimbusJwtEncoderusing the provided parameters.- Parameters:
- jwkSource- the- com.nimbusds.jose.jwk.source.JWKSource
 
 
- 
- 
Method Details- 
encodeDescription copied from interface:JwtEncoderEncode the JWT to its compact claims representation format.- Specified by:
- encodein interface- JwtEncoder
- 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
 
 
-