@Deprecated public interface

AuthenticationFailureHandler

com.atlassian.stash.auth.AuthenticationFailureHandler

This interface is deprecated.
superseded by HttpAuthenticationFailureHandler. Will be removed in Stash 3.0

Class Overview

Defines a handler which will be invoked when basic authentication fails due to incorrect credentials.

If an incoming HTTP request includes a basic authentication header, the credentials supplied will be used to authenticate the user. If authentication fails, all registered handlers will be invoked ordered by their weight.

Note: If no authentication header is included authentication will not attempted and handlers will not be invoked. Authentication that is not attempted cannot fail.

Summary

Public Methods
boolean handleAuthenticationFailure(AuthenticationState authenticationState, HttpServletRequest request, HttpServletResponse response)
Invoked by the system when basic authentication has failed.

Public Methods

public boolean handleAuthenticationFailure (AuthenticationState authenticationState, HttpServletRequest request, HttpServletResponse response)

Invoked by the system when basic authentication has failed. The registered handlers will be invoked in weight order until a handler returns true, indicating that it has handled the failure and no further processing is required. As soon as one handler declares it has handled the failure no further handlers are invoked.

Parameters
authenticationState the reason that authentication failed
request the current request
response the current response
Returns
  • true if this handle has handled the failure, or false if this handler is not capable of handling the failure. Note that no further handlers will be invoked for a failure once a preceding handler has returned true.
Throws
IOException if there was a problem reading from/writing to the request/response