public interface

LoginManager

com.atlassian.confluence.security.login.LoginManager
Known Indirect Subclasses

Class Overview

The LoginManager keeps track of users login activities.

Summary

Public Methods
abstract LoginResult authenticate(String userName, String password)
Try to authenticate a user given the userName and password.
abstract LoginInfo getLoginInfo(User user)
Return information about a user's login history.
abstract LoginInfo getLoginInfo(String userName)
Return information about a user's login history.
abstract boolean isElevatedSecurityCheckEnabled()
Check if elevated security checks are available/enabled.
abstract void onFailedLoginAttempt(String userName, HttpServletRequest servletRequest)
This is called after an unsuccessful login attempt has been made.
abstract void onFailedLoginAttempt(String userName)
This method is deprecated. since 3.4 use onFailedLoginAttempt(String, HttpServletRequest) instead
abstract void onSuccessfulLoginAttempt(String userName)
This method is deprecated. since 3.4 use onSuccessfulLoginAttempt(String, HttpServletRequest) instead
abstract void onSuccessfulLoginAttempt(String userName, HttpServletRequest servletRequest)
This is called after a successful login attempt has been made.
abstract boolean requiresElevatedSecurityCheck(String userName)
This is called to see whether the user requires an extended security check (such as CAPTCHA)
abstract void resetFailedLoginCount(User user)
This can be called to reset the failed login count of a user

Public Methods

public abstract LoginResult authenticate (String userName, String password)

Try to authenticate a user given the userName and password.

Returns a LoginResult that contains information about this particular authentication attempt.

Calling this method has side effects as the login manager tracks the number of failed and successful login attempts.
Returns
  • The result of the authentication attempt, this will never be null.

public abstract LoginInfo getLoginInfo (User user)

Return information about a user's login history.

Returns
  • LoginInfo

public abstract LoginInfo getLoginInfo (String userName)

Return information about a user's login history.

Returns
  • LoginInfo

public abstract boolean isElevatedSecurityCheckEnabled ()

Check if elevated security checks are available/enabled.

Returns
  • true if elevated security checks are enabled, false otherwise

public abstract void onFailedLoginAttempt (String userName, HttpServletRequest servletRequest)

This is called after an unsuccessful login attempt has been made. It allows the LoginManager to update information about a users login history.

Parameters
userName the name of the user in play. This MUST not be null.
servletRequest the request pertaining to a login attempt.

public abstract void onFailedLoginAttempt (String userName)

This method is deprecated.
since 3.4 use onFailedLoginAttempt(String, HttpServletRequest) instead

public abstract void onSuccessfulLoginAttempt (String userName)

This method is deprecated.
since 3.4 use onSuccessfulLoginAttempt(String, HttpServletRequest) instead

public abstract void onSuccessfulLoginAttempt (String userName, HttpServletRequest servletRequest)

This is called after a successful login attempt has been made. It allows the LoginManager to update information about a users login history.

Parameters
userName the name of the user in play. This MUST not be null.
servletRequest the request pertaining to a login attempt.

public abstract boolean requiresElevatedSecurityCheck (String userName)

This is called to see whether the user requires an extended security check (such as CAPTCHA)

Parameters
userName the name of the user in play. This MUST not be null.
Returns
  • true if the user with the user name userName requires an extended security check

public abstract void resetFailedLoginCount (User user)

This can be called to reset the failed login count of a user

Parameters
user the user for which to reset the failed login count. This MUST not be null.