DefaultTokenRequestHandlerSpi
in package
implements
TokenRequestHandlerSpi
An implementation of the TokenRequestHandlerSpi interface that uses Laravel's standard authentication mechanism.
Table of Contents
Interfaces
- TokenRequestHandlerSpi
- Service Provider Interface for TokenRequestHandler.
Methods
- authenticateUser() : string
- Authenticate an end-user.
- getProperties() : array<string|int, Property>
- Get arbitrary key-value pairs to be associated with an access token.
- username() : string
- Get the database column for unique user identifiers.
Methods
authenticateUser()
Authenticate an end-user.
public
authenticateUser(string $username, string $password) : string
Parameters
- $username : string
- $password : string
Return values
string —The subject (= unique identifier) of the authenticated end-user.
If the pair of $username
and $password
is invalid. null
should be returned.
getProperties()
Get arbitrary key-value pairs to be associated with an access token.
public
getProperties() : array<string|int, Property>
Return values
array<string|int, Property> —Arbitrary key-value pairs to be associated with an access token.
username()
Get the database column for unique user identifiers.
protected
username() : string
The default implementation of this method returns 'email'
.
Return values
string —The detabase column for unique user identifiers.