Class OAuth2AccessTokenResponseAuthenticationSuccessHandler
java.lang.Object
org.springframework.security.oauth2.server.authorization.web.authentication.OAuth2AccessTokenResponseAuthenticationSuccessHandler
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationSuccessHandler
public final class OAuth2AccessTokenResponseAuthenticationSuccessHandler
extends Object
implements org.springframework.security.web.authentication.AuthenticationSuccessHandler
An implementation of an
AuthenticationSuccessHandler used for handling an
OAuth2AccessTokenAuthenticationToken and returning the
Access Token Response.- Since:
- 1.3
- See Also:
-
AuthenticationSuccessHandlerOAuth2AccessTokenResponseHttpMessageConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) voidsetAccessTokenResponseCustomizer(Consumer<OAuth2AccessTokenAuthenticationContext> accessTokenResponseCustomizer) Sets theConsumerproviding access to theOAuth2AccessTokenAuthenticationContextcontaining anOAuth2AccessTokenResponse.Builderand additional context information.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.web.authentication.AuthenticationSuccessHandler
onAuthenticationSuccess
-
Constructor Details
-
OAuth2AccessTokenResponseAuthenticationSuccessHandler
public OAuth2AccessTokenResponseAuthenticationSuccessHandler()
-
-
Method Details
-
onAuthenticationSuccess
public void onAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) throws IOException, jakarta.servlet.ServletException - Specified by:
onAuthenticationSuccessin interfaceorg.springframework.security.web.authentication.AuthenticationSuccessHandler- Throws:
IOExceptionjakarta.servlet.ServletException
-
setAccessTokenResponseCustomizer
public void setAccessTokenResponseCustomizer(Consumer<OAuth2AccessTokenAuthenticationContext> accessTokenResponseCustomizer) Sets theConsumerproviding access to theOAuth2AccessTokenAuthenticationContextcontaining anOAuth2AccessTokenResponse.Builderand additional context information.- Parameters:
accessTokenResponseCustomizer- theConsumerproviding access to theOAuth2AccessTokenAuthenticationContextcontaining anOAuth2AccessTokenResponse.Builder
-