java.lang.Object | |
↳ | org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler |
Known Direct Subclasses |
AuthenticationFailureHandler which performs a redirect to the value of the defaultFailureUrl
property when the onAuthenticationFailure method is called.
If the property has not been set it will send a 401 response to the client, with the error message from the
AuthenticationException which caused the failure.
If the useForward
property is set, a RequestDispatcher.forward
call will be made to
the destination instead of a redirect.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logger |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Performs the redirect or forward to the
defaultFailureUrl if set, otherwise returns a 401 error code. | |||||||||||
The URL which will be used as the failure destination.
| |||||||||||
Allows overriding of the behaviour when redirecting to a target URL.
| |||||||||||
If set to true, performs a forward to the failure destination URL instead of a redirect.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Caches the
AuthenticationException for use in view rendering. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.security.web.authentication.AuthenticationFailureHandler
|
Performs the redirect or forward to the defaultFailureUrl
if set, otherwise returns a 401 error code.
If redirecting or forwarding, saveException
will be called to cache the exception for use in
the target view.
request | the request during which the authentication attempt occurred. |
---|---|
response | the response. |
exception | the exception which was thrown to reject the authentication request. |
IOException | |
---|---|
ServletException |
The URL which will be used as the failure destination.
defaultFailureUrl | the failure URL, for example "/loginFailed.jsp". |
---|
Allows overriding of the behaviour when redirecting to a target URL.
If set to true, performs a forward to the failure destination URL instead of a redirect. Defaults to false.
Caches the AuthenticationException
for use in view rendering.
If forwardToDestination
is set to true, request scope will be used, otherwise it will attempt to store
the exception in the session. If there is no session and allowSessionCreation
is true
a session
will be created. Otherwise the exception will not be stored.