DefaultUserClaimProvider
in package
implements
UserClaimProvider
An implementation of the UserClaimProvider interface that uses Laravel's standard authentication mechanism.
Tags
Table of Contents
Interfaces
- UserClaimProvider
- Interface to get a claim value by specifying a user's subject, a claim name and optionally a language tag.
Methods
- __construct() : mixed
- Constructor.
- getUser() : User
- Get the user.
- getUserClaimValue() : mixed
- Get the value of a claim of the user.
- setUser() : DefaultUserClaimProvider
- Set the user.
Methods
__construct()
Constructor.
public
__construct([User $user = null ]) : mixed
Parameters
- $user : User = null
-
The user. May be null.
getUser()
Get the user.
public
getUser() : User
Return values
User —The user.
getUserClaimValue()
Get the value of a claim of the user.
public
getUserClaimValue(string $subject, string $claimName, string $languageTag) : mixed
Parameters
- $subject : string
- $claimName : string
- $languageTag : string
Return values
mixed —The value of the claim. null
if the value is not available.
The returned value must be able to be processed by json_encode()
.
setUser()
Set the user.
public
setUser([User $user = null ]) : DefaultUserClaimProvider
Parameters
- $user : User = null
-
The user.
Return values
DefaultUserClaimProvider —$this
object.