trait
Illuminate
/
Foundation
/
Testing
/
Concerns
/
InteractsWithAuthentication
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
InteractsWithAuthentication
Methods
public
actingAs ( Authenticatable $user , $guard ) : $this
Set the currently logged in user for the application.
Parameters
- $user Authenticatable
- $guard string|null
public
be ( Authenticatable $user , $guard ) : $this
Set the currently logged in user for the application.
Parameters
- $user Authenticatable
- $guard string|null
public
assertAuthenticated ( $guard ) : $this
Assert that the user is authenticated.
Parameters
- $guard string|null
public
assertGuest ( $guard ) : $this
Assert that the user is not authenticated.
Parameters
- $guard string|null
protected
isAuthenticated ( $guard ) : bool
Return true if the user is authenticated, false otherwise.
Parameters
- $guard string|null
public
assertAuthenticatedAs ( $user , $guard ) : $this
Assert that the user is authenticated as the given user.
Parameters
- $user Authenticatable
- $guard string|null
public
assertCredentials ( array $credentials , $guard ) : $this
Assert that the given credentials are valid.
Parameters
- $credentials array
- $guard string|null
public
assertInvalidCredentials ( array $credentials , $guard ) : $this
Assert that the given credentials are invalid.
Parameters
- $credentials array
- $guard string|null
protected
hasCredentials ( array $credentials , $guard ) : bool
Return true if the credentials are valid, false otherwise.
Parameters
- $credentials array
- $guard string|null