Class TokenRelayKeycloakClientContext
java.lang.Object
org.springframework.security.oauth2.client.DefaultOAuth2ClientContext
org.qubership.atp.auth.springbootstarter.security.oauth2.client.relay.TokenRelayKeycloakClientContext
- All Implemented Interfaces:
Serializable,org.springframework.security.oauth2.client.OAuth2ClientContext
public class TokenRelayKeycloakClientContext
extends org.springframework.security.oauth2.client.DefaultOAuth2ClientContext
This context unlike
DefaultOAuth2ClientContext not requests token using credentials, it
gets the existed token from current authentication. If there is no token in current
authentication, TokenRelayException will be thrown.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTokenRelayKeycloakClientContext(org.springframework.security.oauth2.client.token.AccessTokenRequest accessTokenRequest) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.common.OAuth2AccessTokenMethods inherited from class org.springframework.security.oauth2.client.DefaultOAuth2ClientContext
getAccessTokenRequest, removePreservedState, setAccessToken, setPreservedState
-
Constructor Details
-
TokenRelayKeycloakClientContext
public TokenRelayKeycloakClientContext(org.springframework.security.oauth2.client.token.AccessTokenRequest accessTokenRequest)
-
-
Method Details
-
getAccessToken
public org.springframework.security.oauth2.common.OAuth2AccessToken getAccessToken()- Specified by:
getAccessTokenin interfaceorg.springframework.security.oauth2.client.OAuth2ClientContext- Overrides:
getAccessTokenin classorg.springframework.security.oauth2.client.DefaultOAuth2ClientContext
-