AuthInterface
in
AuthInterface is the interface that should be implemented by auth method classes.
Tags
Table of Contents
Methods
- authenticate() : IdentityInterface|null
- Authenticates the current user.
- challenge() : mixed
- Generates challenges upon authentication failure.
- handleFailure() : mixed
- Handles authentication failure.
Methods
authenticate()
Authenticates the current user.
public
authenticate(User $user, Request $request, Response $response) : IdentityInterface|null
Parameters
Tags
Return values
IdentityInterface|null —the authenticated user identity. If authentication information is not provided, null will be returned.
challenge()
Generates challenges upon authentication failure.
public
challenge(Response $response) : mixed
For example, some appropriate HTTP headers may be generated.
Parameters
- $response : Response
handleFailure()
Handles authentication failure.
public
handleFailure(Response $response) : mixed
The implementation should normally throw UnauthorizedHttpException to indicate authentication failure.
Parameters
- $response : Response