Interface providing a hook to have a chance to add additional claims inside the JWT
Type Params | Return Type | Name and description |
---|---|---|
|
void |
provideCustomClaims(com.nimbusds.jwt.JWTClaimsSet$Builder builder, org.springframework.security.core.userdetails.UserDetails details, java.lang.String principal, java.lang.Integer expiration) The method will be called when the JWT is built. |
The method will be called when the JWT is built. Use the builder to include additional claims, if needed.
builder
- the claim builder used to add additional claimsdetails
- the org.springframework.security.core.userdetails.UserDetails representing the authenticated userprincipal
- the principal, usually the usernameexpiration
- the expiration time in seconds for which the JWT is configured to