Example usage for org.springframework.security.oauth2.client.filter OAuth2AuthenticationFailureEvent getException

List of usage examples for org.springframework.security.oauth2.client.filter OAuth2AuthenticationFailureEvent getException

Introduction

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

Prototype

public AuthenticationException getException() 

Source Link

Usage

From source file:org.springframework.cloud.dataflow.server.config.security.OAuthSecurityConfiguration.java

@EventListener
public void handleOAuth2AuthenticationFailureEvent(
        OAuth2AuthenticationFailureEvent oAuth2AuthenticationFailureEvent) {
    final int throwableIdex = ExceptionUtils.indexOfThrowable(oAuth2AuthenticationFailureEvent.getException(),
            ResourceAccessException.class);
    if (throwableIdex > -1) {
        logger.error("An error ocurred while accessing an authentication REST resource.",
                oAuth2AuthenticationFailureEvent.getException());
    }/* w  w w  .  ja v  a  2  s.c  o  m*/
}