MediaWiki  master
MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook:

Public Member Functions

 onAuthManagerLoginAuthenticateAudit ( $response, $user, $username, $extraData)
 This hook is called when a login attempt either succeeds or fails for a reason other than misconfiguration or session loss. More...
 

Detailed Description

Stable to implement.

Definition at line 12 of file AuthManagerLoginAuthenticateAuditHook.php.

Member Function Documentation

◆ onAuthManagerLoginAuthenticateAudit()

MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook::onAuthManagerLoginAuthenticateAudit (   $response,
  $user,
  $username,
  $extraData 
)

This hook is called when a login attempt either succeeds or fails for a reason other than misconfiguration or session loss.

No return data is accepted; this hook is for auditing only.

Since
1.35
Parameters
AuthenticationResponse$responseResponse in either a PASS or FAIL state
User | null$userUser being authenticated against, or null if authentication failed before getting that far
string$usernameA guess at the username being authenticated, or null if we can't even determine that. When $user is not null, it can be in the form of <username><more info> (e.g. for bot passwords).
string[]$extraDataArray (string => string) with extra information, intended to be added to log contexts. Fields it might include:
  • appId: application ID, only if the login was with a bot password
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: