public class SpringSecurityWebErrorHandler extends Object implements WebErrorHandler
WebErrorHandler implementation responsible for handling Spring Security
related exceptions.| Modifier and Type | Field and Description |
|---|---|
static String |
ACCESS_DENIED
When the client is not authorized to access a protected resource.
|
static String |
ACCOUNT_EXPIRED
When the user account is expired.
|
static String |
AUTH_REQUIRED
When someone tried to access a protected resource without proper authorization.
|
static String |
BAD_CREDENTIALS
When the given user credentials where wrong.
|
static String |
INTERNAL_ERROR
When something unexpected happened during security checks.
|
static String |
USER_DISABLED
When the user is disabled.
|
static String |
USER_LOCKED
When the user is locked.
|
| Constructor and Description |
|---|
SpringSecurityWebErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(Throwable exception)
Can only handle
AccessDeniedException or AuthenticationExceptions. |
HandledException |
handle(Throwable exception)
Bunch of if-else-es to handle Spring Security specific exceptions.
|
public static final String ACCESS_DENIED
public static final String ACCOUNT_EXPIRED
public static final String AUTH_REQUIRED
public static final String INTERNAL_ERROR
public static final String BAD_CREDENTIALS
public static final String USER_LOCKED
public static final String USER_DISABLED
public boolean canHandle(Throwable exception)
AccessDeniedException or AuthenticationExceptions.canHandle in interface WebErrorHandlerexception - The exception to examine.true for Spring Security specific exceptions, false otherwise.@NonNull public HandledException handle(Throwable exception)
handle in interface WebErrorHandlerexception - The exception to handle.HandledException.Copyright © 2018. All rights reserved.