@Unstable
@Role
public interface AuthenticationFailureManager
Modifier and Type | Method and Description |
---|---|
DocumentReference |
findUser(String username)
Find a user document reference based on the given username.
|
String |
getErrorMessage(String username)
If the user reached the authentication failure limit, aggregate the error message of the different strategies
(see
AuthenticationFailureStrategy.getErrorMessage(String) ). |
String |
getForm(String username,
javax.servlet.http.HttpServletRequest request)
If the user reached the authentication failure limit, aggregate form information returned by the different
strategies (see
AuthenticationFailureStrategy.getForm(String) ). |
boolean |
recordAuthenticationFailure(String username,
javax.servlet.http.HttpServletRequest request)
Record that the given username fails to authenticate.
|
default void |
resetAuthenticationFailureCounter(DocumentReference user)
Remove all records of authentication failure for the given user.
|
void |
resetAuthenticationFailureCounter(String username)
Remove all records of authentication failure for the given user.
|
boolean |
validateForm(String username,
javax.servlet.http.HttpServletRequest request)
If the user reached the authentication failure limit, validate the form information against the different
strategies used and return the result
(see
AuthenticationFailureStrategy.validateForm(String, HttpServletRequest) ). |
boolean recordAuthenticationFailure(String username, javax.servlet.http.HttpServletRequest request)
username
- the username that fails the authentication. Should be the username typed by the user and not a
computed login.request
- a wrapping of the request used for the authentication.void resetAuthenticationFailureCounter(String username)
username
- the username that is used for the authentication. Should be the username typed by the user and
not a computed login.String getForm(String username, javax.servlet.http.HttpServletRequest request)
AuthenticationFailureStrategy.getForm(String)
). Else return an empty string.username
- the username that is used for the authentication. Should be the username typed by the user and
not a computed login.request
- a wrapping of the request used for the authentication.boolean validateForm(String username, javax.servlet.http.HttpServletRequest request)
AuthenticationFailureStrategy.validateForm(String, HttpServletRequest)
). Else returns true.username
- the username that is used for the authentication. Should be the username typed by the user and
not a computed login.request
- a wrapping of the request used for the authentication.String getErrorMessage(String username)
AuthenticationFailureStrategy.getErrorMessage(String)
). Else return an empty string.username
- the username that is used for the authentication. Should be the username typed by the user and
not a computed login.DocumentReference findUser(String username)
username
- the username from which to query the user document reference.default void resetAuthenticationFailureCounter(DocumentReference user)
user
- the document reference of a user.Copyright © 2004–2021 XWiki. All rights reserved.