Example usage for org.springframework.security.authentication.jaas.event JaasAuthenticationFailedEvent JaasAuthenticationFailedEvent

List of usage examples for org.springframework.security.authentication.jaas.event JaasAuthenticationFailedEvent JaasAuthenticationFailedEvent

Introduction

In this page you can find the example usage for org.springframework.security.authentication.jaas.event JaasAuthenticationFailedEvent JaasAuthenticationFailedEvent.

Prototype

public JaasAuthenticationFailedEvent(Authentication auth, Exception exception) 

Source Link

Usage

From source file:org.springframework.security.authentication.jaas.AbstractJaasAuthenticationProvider.java

/**
 * Publishes the {@link JaasAuthenticationFailedEvent}. Can be overridden by
 * subclasses for different functionality
 *
 * @param token The authentication token being processed
 * @param ase The excetion that caused the authentication failure
 *//*from   ww w  . j  a  v a2  s.  c o  m*/
protected void publishFailureEvent(UsernamePasswordAuthenticationToken token, AuthenticationException ase) {
    if (this.applicationEventPublisher != null) {
        this.applicationEventPublisher.publishEvent(new JaasAuthenticationFailedEvent(token, ase));
    }
}

From source file:org.springframework.security.authentication.jaas.JaasAuthenticationProvider.java

/**
 * Publishes the {@link JaasAuthenticationFailedEvent}. Can be overridden by
 * subclasses for different functionality
 *
 * @param token The authentication token being processed
 * @param ase The excetion that caused the authentication failure
 *///from   w  w  w . ja  v a2  s. c o  m
@Override
protected void publishFailureEvent(UsernamePasswordAuthenticationToken token, AuthenticationException ase) {
    // exists for passivity (the superclass does a null check before publishing)
    getApplicationEventPublisher().publishEvent(new JaasAuthenticationFailedEvent(token, ase));
}