Guard
class Guard implements Guard (View source)
Methods
Create a new authentication guard.
Determine if the current user is authenticated.
Determine if the current user is a guest.
Get the currently authenticated user.
Get the ID for the currently authenticated user.
Log a user into the application without sessions or cookies.
Validate a user's credentials.
Attempt to authenticate using HTTP Basic Auth.
Perform a stateless HTTP Basic login attempt.
Attempt to authenticate a user using the given credentials.
Register an authentication attempt event listener.
Log the given user ID into the application.
Log the given user ID into the application without sessions or cookies.
Log the user out of the application.
Get the cookie creator instance used by the guard.
Get the event dispatcher instance.
Get the session store used by the guard.
Get the user provider used by the guard.
Return the currently cached user.
Get the current request instance.
Set the current request instance.
Get the last user we attempted to authenticate.
Get a unique identifier for the auth session value.
Get the name of the cookie used to store the "recaller".
Determine if the user was authenticated via "remember me" cookie.
Details
at line line 96
void
__construct(
UserProvider $provider,
SessionInterface $session,
Request $request = null)
Create a new authentication guard.
at line line 256
bool
once(
array $credentials = array())
Log a user into the application without sessions or cookies.
at line line 284
Response|null
basic(
string $field = 'email')
Attempt to authenticate using HTTP Basic Auth.
at line line 306
Response|null
onceBasic(
string $field = 'email')
Perform a stateless HTTP Basic login attempt.
at line line 361
bool
attempt(
array $credentials = array(),
bool $remember = false,
bool $login = true)
Attempt to authenticate a user using the given credentials.
at line line 416
void
attempting(
mixed $callback)
Register an authentication attempt event listener.
at line line 430
void
login(
Authenticatable $user,
bool $remember = false)
Log a user into the application.
at line line 485
Authenticatable
loginUsingId(
mixed $id,
bool $remember = false)
Log the given user ID into the application.
at line line 500
bool
onceUsingId(
mixed $id)
Log the given user ID into the application without sessions or cookies.
at line line 629
void
setCookieJar(
QueueingFactory $cookie)
Set the cookie creator instance used by the guard.
at line line 767
bool
viaRemember()
Determine if the user was authenticated via "remember me" cookie.