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 34
InteractsWithAuthentication
be(Authenticatable $user, string|null $guard = null)
Set the currently logged in user for the application.
at line 50
InteractsWithAuthentication
assertAuthenticated(string|null $guard = null)
Assert that the user is authenticated.
at line 60
InteractsWithAuthentication
assertGuest(string|null $guard = null)
Assert that the user is not authenticated.
at line 70
protected bool
isAuthenticated(string|null $guard = null)
Return true if the user is authenticated, false otherwise.
at line 78
InteractsWithAuthentication
assertAuthenticatedAs(Authenticatable $user, string|null $guard = null)
Assert that the user is authenticated as the given user.
at line 102
InteractsWithAuthentication
assertCredentials(array $credentials, string|null $guard = null)
Assert that the given credentials are valid.
at line 115
InteractsWithAuthentication
assertInvalidCredentials(array $credentials, string|null $guard = null)
Assert that the given credentials are invalid.
at line 128
protected bool
hasCredentials(array $credentials, string|null $guard = null)
Return true if the credentials are valid, false otherwise.