Gate
- Full name:
\Codefy\Framework\Auth\Gate
Properties
rbac
user
Methods
__construct
public __construct(\Codefy\Framework\Auth\Rbac\Rbac $rbac, \Codefy\Framework\Auth\Repository\AuthUserRepository $user): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$rbac | \Codefy\Framework\Auth\Rbac\Rbac | |
$user | \Codefy\Framework\Auth\Repository\AuthUserRepository |
can
Authorization check.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$permissionName | string | |
$ruleParams | array |
Throws:
current
Get the current authenticated user model.
Throws:
hasAuthenticatedUser
Whether user is authenticated.
resolveUserByToken
Parameters:
| Parameter | Type | Description |
|---|---|---|
$token | string |
Throws:
getRoles
Throws:
guest
A guest is any user without an authenticated token.
isLoggedIn
Whether user is logged in.
getToken
Fetch decrypted token from request context.
getRequest
Return request object.