Manager¶
-
class
OC\Authentication\TwoFactorAuth\
Manager
¶ Source: lib/private/Authentication/TwoFactorAuth/Manager.php#52
Constants¶
-
SESSION_UID_KEY = two_factor_auth_uid
Source: lib/private/Authentication/TwoFactorAuth/Manager.php#53
-
SESSION_UID_DONE = two_factor_auth_passed
Source: lib/private/Authentication/TwoFactorAuth/Manager.php#54
-
REMEMBER_LOGIN = two_factor_remember_login
Source: lib/private/Authentication/TwoFactorAuth/Manager.php#55
-
BACKUP_CODES_PROVIDER_ID = backup_codes
Source: lib/private/Authentication/TwoFactorAuth/Manager.php#56
Properties¶
Methods¶
-
public
OC\Authentication\TwoFactorAuth\Manager::
__construct
($providerLoader, $providerRegistry, $mandatoryTwoFactor, $session, $config, $activityManager, $logger, $tokenProvider, $timeFactory, $eventDispatcher, $legacyDispatcher)¶ Source: lib/private/Authentication/TwoFactorAuth/Manager.php#91
-
public
OC\Authentication\TwoFactorAuth\Manager::
isTwoFactorAuthenticated
($user)¶ - Determine whether the user must provide a second factor challenge
Source: Parameters: - $user (
OCP\IUser
)
Returns: bool
- $user (
-
public
OC\Authentication\TwoFactorAuth\Manager::
getProvider
($user, $challengeProviderId)¶ - Get a 2FA provider by its ID
Source: Parameters: - $user (
OCP\IUser
) - $challengeProviderId (string)
Returns: - $user (
-
public
OC\Authentication\TwoFactorAuth\Manager::
getLoginSetupProviders
($user)¶ Source: Parameters: - $user (
OCP\IUser
)
Returns: Throws: \Exception
- $user (
-
public
OC\Authentication\TwoFactorAuth\Manager::
getProviderSet
($user)¶ - Get the list of 2FA providers for the given user
Source: Parameters: - $user (
OCP\IUser
)
Throws: \Exception
- $user (
-
public
OC\Authentication\TwoFactorAuth\Manager::
verifyChallenge
($providerId, $user, $challenge)¶ - Verify the given challenge
Source: Parameters: - $providerId (string)
- $user (
OCP\IUser
) - $challenge (string)
Returns: bool
-
public
OC\Authentication\TwoFactorAuth\Manager::
needsSecondFactor
($user=null)¶ - Check if the currently logged in user needs to pass 2FA
Source: Parameters: - $user (
OCP\IUser
) the currently logged in user
Returns: bool
- $user (
-
public
OC\Authentication\TwoFactorAuth\Manager::
prepareTwoFactorLogin
($user, $rememberMe)¶ - Prepare the 2FA login
Source: Parameters: - $user (
OCP\IUser
) - $rememberMe (bool)
- $user (
-
public
OC\Authentication\TwoFactorAuth\Manager::
clearTwoFactorPending
($userId)¶ Source: lib/private/Authentication/TwoFactorAuth/Manager.php#394