MediaWiki  1.34.0
MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider Class Reference
Inheritance diagram for MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider:
Collaboration diagram for MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider:

Public Member Functions

 beginSecondaryAccountCreation ( $user, $creator, array $reqs)
 
 beginSecondaryAuthentication ( $user, array $reqs)
 If the user has enabled two-factor authentication, request a second factor. More...
 
 continueSecondaryAuthentication ( $user, array $reqs)
 Verify the second factor. More...
 
 getAuthenticationRequests ( $action, array $options)
 
- Public Member Functions inherited from MediaWiki\Auth\AbstractSecondaryAuthenticationProvider
 autoCreatedAccount ( $user, $source)
 Post-auto-creation callback. More...
 
 continueSecondaryAccountCreation ( $user, $creator, array $reqs)
 Continue an authentication flow. More...
 
 postAccountCreation ( $user, $creator, AuthenticationResponse $response)
 Post-creation callback. More...
 
 postAuthentication ( $user, AuthenticationResponse $response)
 Post-login callback. More...
 
 providerAllowsAuthenticationDataChange (AuthenticationRequest $req, $checkData=true)
 Validate a change of authentication data (e.g. More...
 
 providerAllowsPropertyChange ( $property)
 Determine whether a property can change. More...
 
 providerChangeAuthenticationData (AuthenticationRequest $req)
 Change or remove authentication data (e.g. More...
 
 providerRevokeAccessForUser ( $username)
 Revoke the user's credentials.This may cause the user to no longer exist for the provider, or the user may continue to exist in a "disabled" state.The intention is that the named account will never again be usable for normal login (i.e. there is no way to undo the revocation of access).
Parameters
string$username
More...
 
 testForAccountCreation ( $user, $creator, array $reqs)
 Determine whether an account creation may begin. More...
 
 testUserForCreation ( $user, $autocreate, array $options=[])
 Determine whether an account may be created. More...
 
- Public Member Functions inherited from MediaWiki\Auth\AbstractAuthenticationProvider
 getUniqueId ()
 Return a unique identifier for this instance.This must be the same across requests. If multiple instances return the same ID, exceptions will be thrown from AuthManager.
Returns
string
More...
 
 setConfig (Config $config)
 Set configuration. More...
 
 setLogger (LoggerInterface $logger)
 
 setManager (AuthManager $manager)
 Set AuthManager. More...
 

Private Member Functions

 getProviderForModule (IModule $module)
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\Auth\AbstractAuthenticationProvider
Config $config
 
LoggerInterface $logger
 
AuthManager $manager
 

Detailed Description

Definition at line 13 of file SecondaryAuthenticationProvider.php.

Member Function Documentation

◆ beginSecondaryAccountCreation()

MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider::beginSecondaryAccountCreation (   $user,
  $creator,
array  $reqs 
)
Parameters
User$user
User$creator
array | AuthenticationRequest[]$reqs
Returns
AuthenticationResponse

Implements MediaWiki\Auth\SecondaryAuthenticationProvider.

Definition at line 30 of file SecondaryAuthenticationProvider.php.

References MediaWiki\Auth\AuthenticationResponse\newAbstain().

◆ beginSecondaryAuthentication()

MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider::beginSecondaryAuthentication (   $user,
array  $reqs 
)

If the user has enabled two-factor authentication, request a second factor.

Parameters
User$user
array$reqs
Returns
AuthenticationResponse

Implements MediaWiki\Auth\SecondaryAuthenticationProvider.

Definition at line 42 of file SecondaryAuthenticationProvider.php.

References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider\getProviderForModule(), and MediaWiki\Auth\AuthenticationResponse\newAbstain().

◆ continueSecondaryAuthentication()

MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider::continueSecondaryAuthentication (   $user,
array  $reqs 
)

Verify the second factor.

Continue an authentication flow.

Parameters
User$userUser being authenticated. This may become a "UserValue" in the future, or User may be refactored into such.
AuthenticationRequest[]$reqs
Returns
AuthenticationResponse Expected responses:
  • PASS: The user is authenticated. Additional secondary providers may run.
  • FAIL: The user is not authenticated. Fail the authentication process.
  • ABSTAIN: Additional secondary providers may run.
  • UI: Additional AuthenticationRequests are needed to complete the process.
  • REDIRECT: Redirection to a third party is needed to complete the process.

Reimplemented from MediaWiki\Auth\AbstractSecondaryAuthenticationProvider.

Definition at line 59 of file SecondaryAuthenticationProvider.php.

References $response, MediaWiki\Extension\OATHAuth\OATHAuth\AUTHENTICATED_OVER_2FA, MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider\getProviderForModule(), and MediaWiki\Auth\AuthenticationResponse\PASS.

◆ getAuthenticationRequests()

MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider::getAuthenticationRequests (   $action,
array  $options 
)
Parameters
string$action
array$options
Returns
array

Implements MediaWiki\Auth\AuthenticationProvider.

Definition at line 20 of file SecondaryAuthenticationProvider.php.

◆ getProviderForModule()


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