@Service public class DefaultOIDCTokenService extends Object implements OIDCTokenService
| Constructor and Description |
|---|
DefaultOIDCTokenService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCustomIdTokenClaims(com.nimbusds.jwt.JWTClaimsSet.Builder idClaims,
ClientDetailsEntity client,
org.springframework.security.oauth2.provider.OAuth2Request request,
String sub,
OAuth2AccessTokenEntity accessToken)
Hook for subclasses that allows adding custom claims to the JWT
that will be used as id token.
|
com.nimbusds.jwt.JWT |
createIdToken(ClientDetailsEntity client,
org.springframework.security.oauth2.provider.OAuth2Request request,
Date issueTime,
String sub,
OAuth2AccessTokenEntity accessToken)
Create an id token with the information provided.
|
OAuth2AccessTokenEntity |
createRegistrationAccessToken(ClientDetailsEntity client)
Create a registration access token for the given client.
|
OAuth2AccessTokenEntity |
createResourceAccessToken(ClientDetailsEntity client)
Create a resource access token for the given client (protected resource).
|
AuthenticationHolderRepository |
getAuthenticationHolderRepository() |
ConfigurationPropertiesBean |
getConfigBean() |
JWTSigningAndValidationService |
getJwtService() |
OAuth2AccessTokenEntity |
rotateRegistrationAccessTokenForClient(ClientDetailsEntity client)
Rotate the registration or resource token for a client
|
void |
setAuthenticationHolderRepository(AuthenticationHolderRepository authenticationHolderRepository) |
void |
setConfigBean(ConfigurationPropertiesBean configBean) |
void |
setJwtService(JWTSigningAndValidationService jwtService) |
public DefaultOIDCTokenService()
public com.nimbusds.jwt.JWT createIdToken(ClientDetailsEntity client, org.springframework.security.oauth2.provider.OAuth2Request request, Date issueTime, String sub, OAuth2AccessTokenEntity accessToken)
OIDCTokenServicecreateIdToken in interface OIDCTokenServicepublic OAuth2AccessTokenEntity createRegistrationAccessToken(ClientDetailsEntity client)
OIDCTokenServicecreateRegistrationAccessToken in interface OIDCTokenServiceclient - org.springframework.security.core.AuthenticationExceptionpublic OAuth2AccessTokenEntity createResourceAccessToken(ClientDetailsEntity client)
OIDCTokenServicecreateResourceAccessToken in interface OIDCTokenServiceclient - public OAuth2AccessTokenEntity rotateRegistrationAccessTokenForClient(ClientDetailsEntity client)
OIDCTokenServicerotateRegistrationAccessTokenForClient in interface OIDCTokenServicepublic ConfigurationPropertiesBean getConfigBean()
public void setConfigBean(ConfigurationPropertiesBean configBean)
configBean - the configBean to setpublic JWTSigningAndValidationService getJwtService()
public void setJwtService(JWTSigningAndValidationService jwtService)
jwtService - the jwtService to setpublic AuthenticationHolderRepository getAuthenticationHolderRepository()
public void setAuthenticationHolderRepository(AuthenticationHolderRepository authenticationHolderRepository)
authenticationHolderRepository - the authenticationHolderRepository to setprotected void addCustomIdTokenClaims(com.nimbusds.jwt.JWTClaimsSet.Builder idClaims, ClientDetailsEntity client, org.springframework.security.oauth2.provider.OAuth2Request request, String sub, OAuth2AccessTokenEntity accessToken)
idClaims - the builder holding the current claimsclient - information about the requesting clientrequest - request that caused the id token to be createdsub - subject auf the id tokenaccessToken - the access tokenauthentication - current authenticationCopyright © 2018. All rights reserved.