Manager
class Manager
Auth Manager Class Adapted from Ion Auth.
Constants
AUTH_KEY_NAME |
|
Properties
protected | $sessionKey | ||
protected User | $user | ||
protected string | $model | ||
protected | $requireApproval | ||
protected bool | $useSession | ||
protected bool | $viaRemember |
Methods
Determine if the current user is authenticated.
Determine if the current user is a guest.
Get the ID for the currently authenticated user.
Set the current user model
Validate a user using the given credentials.
Log a user into the application without sessions or cookies.
Log the given user ID into the application without sessions or cookies.
Log a user into the application.
Log the given user ID into the application.
Log the user out of the application.
Determine if the user was authenticated via "remember me" cookie.
No description
No description
Create a new instance of the model if it does not already exist.
Prepares a query derived from the user model.
Gets the name of the user model
Sets the name of the user model
Impersonates the given user and sets properties in the session but not the cookie.
No description
No description
No description
Details
at line 50
check()
Determine if the current user is authenticated.
at line 96
guest()
Determine if the current user is a guest.
at line 106
User
user()
Get the currently authenticated user.
at line 119
int|null
id()
Get the ID for the currently authenticated user.
at line 128
User
getUser()
Get the currently authenticated user model.
at line 138
setUser($user)
Set the current user model
at line 153
User|bool
authenticate(array $credentials = [], bool $remember = false, bool $login = true)
Validate a user using the given credentials.
at line 176
bool
once(array $credentials = [])
Log a user into the application without sessions or cookies.
at line 193
Authenticatable|false
onceUsingId(mixed $id)
Log the given user ID into the application without sessions or cookies.
at line 212
login(Authenticatable $user, bool $remember = false)
Log a user into the application.
at line 247
mixed
loginUsingId($id, bool $remember = false)
Log the given user ID into the application.
at line 262
void
logout()
Log the user out of the application.
at line 290
bool
viaRemember()
Determine if the user was authenticated via "remember me" cookie.
at line 304
Authenticatable|User
getById($identifier)
No description
at line 318
mixed
getByToken($identifier, $token)
No description
at line 334
null|User
getByCredentials(array $credentials)
No description
at line 350
validateCredentials(User $user, $credentials)
No description
at line 368
mixed
createModel()
Create a new instance of the model if it does not already exist.
at line 383
protected
createModelQuery()
Prepares a query derived from the user model.
at line 399
void
extendUserQuery(Builder $query)
Extend the query used for finding the user.
at line 407
string
getModel()
Gets the name of the user model
at line 419
$this
setModel($model)
Sets the name of the user model
at line 432
protected array
getPersistData(Authenticatable|User $user)
Create a new "remember me" token for the user
at line 451
impersonate(User $user)
Impersonates the given user and sets properties in the session but not the cookie.
at line 464
stopImpersonate()
No description
at line 480
isImpersonator()
No description
at line 485
getImpersonator()
No description