CustomCredentials
in package
implements
CredentialsInterface
Implements credentials checking using a custom checker function.
Tags
Table of Contents
Interfaces
- CredentialsInterface
- Credentials are a special badge used to explicitly mark the credential check of an authenticator.
Properties
- $credentials : mixed
- $customCredentialsChecker : Closure
- $resolved : bool
Methods
- __construct() : mixed
- executeCustomChecker() : void
- isResolved() : bool
Properties
$credentials
private
mixed
$credentials
$customCredentialsChecker
private
Closure
$customCredentialsChecker
$resolved
private
bool
$resolved
= false
Methods
__construct()
public
__construct(callable $customCredentialsChecker, mixed $credentials) : mixed
Parameters
- $customCredentialsChecker : callable
-
the check function. If this function does not return
true
, a BadCredentialsException is thrown. You may also throw a more specific exception in the function. - $credentials : mixed
executeCustomChecker()
public
executeCustomChecker(UserInterface $user) : void
Parameters
- $user : UserInterface
isResolved()
public
isResolved() : bool