List of usage examples for org.springframework.security.access.event AuthenticationCredentialsNotFoundEvent AuthenticationCredentialsNotFoundEvent
public AuthenticationCredentialsNotFoundEvent(Object secureObject, Collection<ConfigAttribute> attributes,
AuthenticationCredentialsNotFoundException credentialsNotFoundException)
From source file:springacltutorial.infrastructure.MyMethodSecurityInterceptor.java
/** * Helper method which generates an exception containing the passed reason, * and publishes an event to the application context. * <p>/*w ww . j a va 2 s .c om*/ * Always throws an exception. * * @param reason * to be provided in the exception detail * @param secureObject * that was being called * @param configAttribs * that were defined for the secureObject */ private void credentialsNotFound(String reason, Object secureObject, Collection<ConfigAttribute> configAttribs) { AuthenticationCredentialsNotFoundException exception = new AuthenticationCredentialsNotFoundException( reason); AuthenticationCredentialsNotFoundEvent event = new AuthenticationCredentialsNotFoundEvent(secureObject, configAttribs, exception); publishEvent(event); throw exception; }