InteractsWithAuthentication
trait InteractsWithAuthentication
Methods
Set the currently logged in user for the application.
Clear the currently logged in user for the application.
Set the currently logged in user for the application.
Assert that the user is authenticated.
Assert that the user is not authenticated.
Return true if the user is authenticated, false otherwise.
Assert that the user is authenticated as the given user.
Assert that the given credentials are valid.
Assert that the given credentials are invalid.
Return true if the credentials are valid, false otherwise.
Details
at line 14
InteractsWithAuthentication
actingAs(Authenticatable $user, string|null $guard = null)
Set the currently logged in user for the application.
at line 22
InteractsWithAuthentication
actingAsGuest(string|null $guard = null)
Clear the currently logged in user for the application.
at line 36
InteractsWithAuthentication
be(Authenticatable $user, string|null $guard = null)
Set the currently logged in user for the application.
at line 54
InteractsWithAuthentication
assertAuthenticated(string|null $guard = null)
Assert that the user is authenticated.
at line 64
InteractsWithAuthentication
assertGuest(string|null $guard = null)
Assert that the user is not authenticated.
at line 74
protected bool
isAuthenticated(string|null $guard = null)
Return true if the user is authenticated, false otherwise.
at line 82
InteractsWithAuthentication
assertAuthenticatedAs(Authenticatable $user, string|null $guard = null)
Assert that the user is authenticated as the given user.
at line 106
InteractsWithAuthentication
assertCredentials(array $credentials, string|null $guard = null)
Assert that the given credentials are valid.
at line 119
InteractsWithAuthentication
assertInvalidCredentials(array $credentials, string|null $guard = null)
Assert that the given credentials are invalid.
at line 132
protected bool
hasCredentials(array $credentials, string|null $guard = null)
Return true if the credentials are valid, false otherwise.