TwoFactorProviderService
    
            
            in package
            
        
    
    
    
        
            Returns the correct 2 factor provider.
Table of Contents
- TWO_FACTOR_DUO = 'duo'
 - 2factor authentication via DUO
 - TWO_FACTOR_NONE = 'none'
 - 2factor authentication disabled
 - TWO_FACTOR_OKTA = 'okta'
 - 2factor authentication via Okta
 - TWO_FACTOR_OPENID = 'openid'
 - 2factor authentication via OpenId
 - TWO_FACTOR_PRIVACYIDEA = 'privacyidea'
 - 2factor authentication via privacyIDEA
 - TWO_FACTOR_WEBAUTHN = 'webauthn'
 - 2factor authentication via webauthn
 - TWO_FACTOR_YUBICO = 'yubico'
 - 2factor authentication via YubiKey
 - DEVICE_REMEMBER_DATE_FORMAT = 'Y-m-d H:i:s'
 - date format when remembering devices
 - $config : TwoFactorConfiguration
 - __construct() : mixed
 - Constructor.
 - getProvider() : TwoFactorProvider
 - Returns the provider for the given type.
 - isValidRememberedDevice() : bool
 - Returns if the user has selected to save the device before.
 - rememberDevice() : void
 - Remembers the users device.
 - setCookie() : void
 - Sets a cookie.
 - getConfigAdmin() : TwoFactorConfiguration
 - Returns the configuration for admin interface.
 - getConfigSelfService() : TwoFactorConfiguration
 - Returns the configuration from self service.
 
Constants
TWO_FACTOR_DUO
2factor authentication via DUO
    public
        mixed
    TWO_FACTOR_DUO
    = 'duo'
    
        
    
TWO_FACTOR_NONE
2factor authentication disabled
    public
        mixed
    TWO_FACTOR_NONE
    = 'none'
    
        
    
TWO_FACTOR_OKTA
2factor authentication via Okta
    public
        mixed
    TWO_FACTOR_OKTA
    = 'okta'
    
        
    
TWO_FACTOR_OPENID
2factor authentication via OpenId
    public
        mixed
    TWO_FACTOR_OPENID
    = 'openid'
    
        
    
TWO_FACTOR_PRIVACYIDEA
2factor authentication via privacyIDEA
    public
        mixed
    TWO_FACTOR_PRIVACYIDEA
    = 'privacyidea'
    
        
    
TWO_FACTOR_WEBAUTHN
2factor authentication via webauthn
    public
        mixed
    TWO_FACTOR_WEBAUTHN
    = 'webauthn'
    
        
    
TWO_FACTOR_YUBICO
2factor authentication via YubiKey
    public
        mixed
    TWO_FACTOR_YUBICO
    = 'yubico'
    
        
    
DEVICE_REMEMBER_DATE_FORMAT
date format when remembering devices
    private
        mixed
    DEVICE_REMEMBER_DATE_FORMAT
    = 'Y-m-d H:i:s'
    
        
    
Properties
$config
    private
        TwoFactorConfiguration
    $config
    
        
        
    
Methods
__construct()
Constructor.
    public
                    __construct(selfServiceProfile|LAMConfig $configObj) : mixed
    
        Parameters
- $configObj : selfServiceProfile|LAMConfig
 - 
                    
profile
 
Return values
mixed —getProvider()
Returns the provider for the given type.
    public
                    getProvider() : TwoFactorProvider
    
    
    
    Tags
Return values
TwoFactorProvider —provider
isValidRememberedDevice()
Returns if the user has selected to save the device before.
    public
                    isValidRememberedDevice(string $user) : bool
    
        Parameters
- $user : string
 - 
                    
user name
 
Tags
Return values
bool —valid remembered device
rememberDevice()
Remembers the users device.
    public
                    rememberDevice(string $user) : void
    
        Parameters
- $user : string
 - 
                    
user name
 
Tags
Return values
void —setCookie()
Sets a cookie.
    protected
                    setCookie(string $name, string $value, array<string|int, mixed> $options) : void
    
        Parameters
- $name : string
 - 
                    
cookie name
 - $value : string
 - 
                    
cookie value
 - $options : array<string|int, mixed>
 - 
                    
cookie options
 
Return values
void —getConfigAdmin()
Returns the configuration for admin interface.
    private
                    getConfigAdmin(LAMConfig $conf) : TwoFactorConfiguration
    
        Parameters
- $conf : LAMConfig
 - 
                    
configuration
 
Return values
TwoFactorConfiguration —configuration
getConfigSelfService()
Returns the configuration from self service.
    private
                    getConfigSelfService(selfServiceProfile &$profile) : TwoFactorConfiguration
    
        Parameters
- $profile : selfServiceProfile
 - 
                    
profile
 
Return values
TwoFactorConfiguration —configuration