List of usage examples for org.springframework.security.core AuthenticationException AuthenticationException
public AuthenticationException(String msg, Throwable t)
From source file:com.katsu.springframework.security.authentication.HtmlAuthenticationProvider.java
@Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { AbstractAuthenticationToken upat = (AbstractAuthenticationToken) authentication; if (!upat.isAuthenticated()) { try {/* ww w . j a v a2s . c o m*/ Collection<? extends GrantedAuthority> roles = doLogin(upat); if (roles != null) { return createSuccessAuthentication(upat, roles); } } catch (Exception e) { throw new AuthenticationException("Can't authenticate", e) { }; } finally { } } return null; }