Interface ImpersonationInterface
Namespace: Authentication\Authenticator
Method Summary
-
clearIdentity() public
Clears the identity data
-
impersonate() public
Impersonates a user
-
isImpersonating() public
Returns true if impersonation is being done
-
persistIdentity() public
Persists the users data
-
stopImpersonating() public
Stops impersonation
Method Detail
clearIdentity() ¶ public
clearIdentity(Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response): array
Clears the identity data
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request The request object.
-
Psr\Http\Message\ResponseInterface
$response The response object.
Returns
array
impersonate() ¶ public
impersonate(Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, ArrayAccess $impersonator, ArrayAccess $impersonated): array
Impersonates a user
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request The request
-
Psr\Http\Message\ResponseInterface
$response The response
-
ArrayAccess
$impersonator User who impersonates
-
ArrayAccess
$impersonated User impersonated
Returns
array
isImpersonating() ¶ public
isImpersonating(Psr\Http\Message\ServerRequestInterface $request): bool
Returns true if impersonation is being done
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request The request
Returns
bool
persistIdentity() ¶ public
persistIdentity(Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, ArrayAccess|array $identity): array
Persists the users data
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request The request object.
-
Psr\Http\Message\ResponseInterface
$response The response object.
-
ArrayAccess|array
$identity Identity data to persist.
Returns
array
stopImpersonating() ¶ public
stopImpersonating(Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response): array
Stops impersonation
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request The request
-
Psr\Http\Message\ResponseInterface
$response The response
Returns
array