Interface AuthenticationServiceInterface
Method Summary
-
authenticate() public
Authenticate the request against the configured authentication adapters.
-
clearIdentity() public
Clears the identity data
-
getAuthenticationProvider() public
Gets the successful authenticator instance if one was successful after calling authenticate
-
getIdentity() public
Gets an identity object or null if identity has not been resolved.
-
getIdentityAttribute() public
Return the name of the identity attribute.
-
getLoginRedirect() public
Return the URL that an authenticated user came from or null.
-
getResult() public
Gets the result of the last authenticate() call.
-
getUnauthenticatedRedirectUrl() public
Return the URL to redirect unauthenticated users to.
-
loadAuthenticator() public
Loads an authenticator.
-
loadIdentifier() public
Loads an identifier.
-
persistIdentity() public
Persists the users data
Method Detail
authenticate() ¶ public
authenticate(Psr\Http\Message\ServerRequestInterface $request): Authentication\Authenticator\ResultInterface
Authenticate the request against the configured authentication adapters.
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request The request.
Returns
Authentication\Authenticator\ResultInterface
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
getAuthenticationProvider() ¶ public
getAuthenticationProvider(): Authentication\Authenticator\AuthenticatorInterface|null
Gets the successful authenticator instance if one was successful after calling authenticate
Returns
Authentication\Authenticator\AuthenticatorInterface|null
getIdentity() ¶ public
getIdentity(): nullAuthentication\IdentityInterface
Gets an identity object or null if identity has not been resolved.
Returns
nullAuthentication\IdentityInterface
getIdentityAttribute() ¶ public
getIdentityAttribute(): string
Return the name of the identity attribute.
Returns
string
getLoginRedirect() ¶ public
getLoginRedirect(Psr\Http\Message\ServerRequestInterface $request): string|null
Return the URL that an authenticated user came from or null.
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request The request
Returns
string|null
getResult() ¶ public
getResult(): Authentication\Authenticator\ResultInterface|null
Gets the result of the last authenticate() call.
Returns
Authentication\Authenticator\ResultInterface|null
getUnauthenticatedRedirectUrl() ¶ public
getUnauthenticatedRedirectUrl(Psr\Http\Message\ServerRequestInterface $request): string|null
Return the URL to redirect unauthenticated users to.
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request The request
Returns
string|null
loadAuthenticator() ¶ public
loadAuthenticator(string $name, array $config = []): Authentication\Authenticator\AuthenticatorInterface
Loads an authenticator.
Parameters
-
string
$name Name or class name.
-
array
$config optional Authenticator configuration.
Returns
Authentication\Authenticator\AuthenticatorInterface
loadIdentifier() ¶ public
loadIdentifier(string $name, array $config = []): Authentication\Identifier\IdentifierInterface
Loads an identifier.
Parameters
-
string
$name Name or class name.
-
array
$config optional Identifier configuration.
Returns
Authentication\Identifier\IdentifierInterface
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