Interface Yiisoft\Auth\AuthenticationMethodInterface
The interface that should be implemented by individual authentication methods.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| authenticate() | Authenticates the identity based on information available from request. | Yiisoft\Auth\AuthenticationMethodInterface |
| challenge() | Adds challenge to response upon authentication failure. | Yiisoft\Auth\AuthenticationMethodInterface |
Method Details
Authenticates the identity based on information available from request.
| public abstract Yiisoft\Auth\IdentityInterface|null authenticate ( \Psr\Http\Message\ServerRequestInterface $request ) | ||
| $request | \Psr\Http\Message\ServerRequestInterface |
Request to get identity information from. |
| return | Yiisoft\Auth\IdentityInterface|null |
An instance of identity or null if there is no match. |
|---|---|---|
public function authenticate(ServerRequestInterface $request): ?IdentityInterface;
Adds challenge to response upon authentication failure.
For example, some appropriate HTTP headers may be added.
| public abstract \Psr\Http\Message\ResponseInterface challenge ( \Psr\Http\Message\ResponseInterface $response ) | ||
| $response | \Psr\Http\Message\ResponseInterface |
Response to modify. |
| return | \Psr\Http\Message\ResponseInterface |
Modified response. |
|---|---|---|
public function challenge(ResponseInterface $response): ResponseInterface;
Signup or Login in order to comment.