Example usage for org.springframework.security.oauth2.client.filter OAuth2ClientAuthenticationProcessingFilter setAuthenticationSuccessHandler

List of usage examples for org.springframework.security.oauth2.client.filter OAuth2ClientAuthenticationProcessingFilter setAuthenticationSuccessHandler

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.client.filter OAuth2ClientAuthenticationProcessingFilter setAuthenticationSuccessHandler.

Prototype

public void setAuthenticationSuccessHandler(AuthenticationSuccessHandler successHandler) 

Source Link

Document

Sets the strategy used to handle a successful authentication.

Usage

From source file:com.epam.reportportal.auth.OAuthSecurityConfig.java

private List<OAuth2ClientAuthenticationProcessingFilter> getDefaultFilters(
        OAuth2ClientContext oauth2ClientContext) {
    OAuth2ClientAuthenticationProcessingFilter githubFilter = new OAuth2ClientAuthenticationProcessingFilter(
            SSO_LOGIN_PATH + "/github");

    githubFilter.setRestTemplate(dynamicAuthProvider.getRestTemplate(GITHUB, oauth2ClientContext));
    GitHubTokenServices tokenServices = new GitHubTokenServices(githubReplicator,
            dynamicAuthProvider.getLoginDetailsSupplier(GITHUB));
    githubFilter.setTokenServices(tokenServices);
    githubFilter.setAuthenticationSuccessHandler(authSuccessHandler);

    return Collections.singletonList(githubFilter);
}