TwoFactor
class TwoFactor (View source)
Two factor authentication wrapper class
Properties
array | $config | ||
protected bool | $writable | ||
protected TwoFactorPlugin | $backend | ||
protected string[] | $available |
Methods
Creates new TwoFactor object
Reads the configuration
No description
No description
No description
No description
Returns list of available backends
Returns list of missing dependencies
Returns class name for given name
Returns backend for current user
Checks authentication, returns true on success
Saves current configuration.
Returns array with all available backends
Details
__construct(string $user)
Creates new TwoFactor object
array
readConfig()
Reads the configuration
bool
isWritable()
No description
TwoFactorPlugin
getBackend()
No description
array
getAvailable()
No description
bool
showSubmit()
No description
array
getAvailableBackends()
Returns list of available backends
array
getMissingDeps()
Returns list of missing dependencies
string
getBackendClass(string $name)
Returns class name for given name
TwoFactorPlugin
getBackendForCurrentUser()
Returns backend for current user
bool
check(ServerRequest $request, bool $skipSession = false)
Checks authentication, returns true on success
string
render(ServerRequest $request)
Renders user interface to enter two-factor authentication
string
setup(ServerRequest $request)
Renders user interface to configure two-factor authentication
Message
save()
Saves current configuration.
bool
configure(ServerRequest $request, string $name)
Changes two-factor authentication settings
The object might stay in partially changed setup if configuration fails.
array
getAllBackends()
Returns array with all available backends