Property | Type | Description | |
---|---|---|---|
$activations | Cartalyst\Sentinel\Activations\ActivationRepositoryInterface | The Activations repository. | |
$basicResponse | Closure | The closure used to create a basic response for failed HTTP auth. | |
$checkpoints | array | Array that holds all the enabled checkpoints. | |
$checkpointsStatus | boolean | Flag for the checkpoint status. | |
$persistences | Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface | The Persistence repository. | |
$reminders | Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface | The Reminders repository. | |
$requestCredentials | Closure | The closure to retrieve the request credentials. | |
$roles | Cartalyst\Sentinel\Roles\RoleRepositoryInterface | The Role repository. | |
$throttle | Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface | The Throttle repository. | |
$user | Cartalyst\Sentinel\Users\UserInterface | The current cached, logged in user. | |
$userMethods | array | Cached, available methods on the user repository, used for dynamic calls. | |
$users | Cartalyst\Sentinel\Users\UserRepositoryInterface | The User repository. |
Method | Description | |
---|---|---|
__call ( string $method, array $parameters ) : mixed | Dynamically pass missing methods to Sentinel. | |
__construct ( Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface $persistences, Cartalyst\Sentinel\Users\UserRepositoryInterface $users, Cartalyst\Sentinel\Roles\RoleRepositoryInterface $roles, Cartalyst\Sentinel\Activations\ActivationRepositoryInterface $activations, Illuminate\Events\Dispatcher $dispatcher ) : void | Create a new Sentinel instance. | |
activate ( mixed $user ) : boolean | Activates the given user. | |
addCheckpoint ( string $key, Cartalyst\Sentinel\Checkpoints\CheckpointInterface $checkpoint ) : void | Add a new checkpoint to Sentinel. | |
authenticate ( Cartalyst\Sentinel\Users\UserInterface | array $credentials, boolean $remember = false, boolean $login = true ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Authenticates a user, with "remember" flag. | |
authenticateAndRemember ( Cartalyst\Sentinel\Users\UserInterface | array $credentials ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Authenticates a user, with the "remember" flag. | |
basic ( ) : mixed | Attempt to authenticate using HTTP Basic Auth. | |
bypassCheckpoints ( Closure $callback, array $checkpoints = [] ) : mixed | Pass a closure to Sentinel to bypass checkpoints. | |
check ( ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Checks to see if a user is logged in. | |
checkpointsStatus ( ) : boolean | Checks if checkpoints are enabled. | |
creatingBasicResponse ( Closure $basicResponse ) : void | Sets the callback which creates a basic response. | |
disableCheckpoints ( ) : void | Disables checkpoints. | |
enableCheckpoints ( ) : void | Enables checkpoints. | |
forceAuthenticate ( Cartalyst\Sentinel\Users\UserInterface | array $credentials, boolean $remember = false ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Forces an authentication to bypass checkpoints. | |
forceAuthenticateAndRemember ( Cartalyst\Sentinel\Users\UserInterface | array $credentials ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Forces an authentication to bypass checkpoints, with the "remember" flag. | |
forceCheck ( ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Checks to see if a user is logged in, bypassing checkpoints | |
getActivationRepository ( ) : Cartalyst\Sentinel\Activations\ActivationRepositoryInterface | Returns the activations repository. | |
getBasicResponse ( ) : mixed | Sends a response when HTTP basic authentication fails. | |
getPersistenceRepository ( ) : Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface | Returns the persistences repository. | |
getReminderRepository ( ) : Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface | Returns the reminders repository. | |
getRequestCredentials ( ) : array | Returns the request credentials. | |
getRoleRepository ( ) : Cartalyst\Sentinel\Roles\RoleRepositoryInterface | Returns the role repository. | |
getThrottleRepository ( ) : Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface | Returns the throttle repository. | |
getUser ( boolean $check = true ) : Cartalyst\Sentinel\Users\UserInterface | Returns the currently logged in user, lazily checking for it. | |
getUserRepository ( ) : Cartalyst\Sentinel\Users\UserRepositoryInterface | Returns the user repository. | |
guest ( ) : boolean | Checks if we are currently a guest. | |
login ( Cartalyst\Sentinel\Users\UserInterface $user, boolean $remember = false ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Persists a login for the given user. | |
loginAndRemember ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Persists a login for the given user, with the "remember" flag. | |
logout ( Cartalyst\Sentinel\Users\UserInterface $user = null, boolean $everywhere = false ) : boolean | Logs the current user out. | |
register ( array $credentials, Closure | boolean $callback = null ) : Cartalyst\Sentinel\Users\UserInteface | boolean | Registers a user. You may provide a callback to occur before the user is saved, or provide a true boolean as a shortcut to activation. | |
registerAndActivate ( array $credentials ) : Cartalyst\Sentinel\Users\UserInteface | boolean | Registers and activates the user. | |
removeCheckpoint ( string $key ) : void | Removes a checkpoint. | |
removeCheckpoints ( array $checkpoints = [] ) : void | Removes the given checkpoints. | |
setActivationRepository ( Cartalyst\Sentinel\Activations\ActivationRepositoryInterface $activations ) : void | Sets the activations repository. | |
setPersistenceRepository ( Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface $persistences ) : void | Sets the persistences repository. | |
setReminderRepository ( Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface $reminders ) : void | Sets the reminders repository. | |
setRequestCredentials ( Closure $requestCredentials ) : void | Sets the closure which resolves the request credentials. | |
setRoleRepository ( Cartalyst\Sentinel\Roles\RoleRepositoryInterface $roles ) : void | Sets the role repository. | |
setThrottleRepository ( Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface $throttle ) : void | Sets the throttle repository. | |
setUser ( Cartalyst\Sentinel\Users\UserInterface $user ) : void | Sets the user associated with Sentinel (does not log in). | |
setUserRepository ( Cartalyst\Sentinel\Users\UserRepositoryInterface $users ) : void | Sets the user repository. | |
stateless ( Cartalyst\Sentinel\Users\UserInterface | array $credentials ) : Cartalyst\Sentinel\Users\UserInterface | boolean | Attempt a stateless authentication. |
Method | Description | |
---|---|---|
cycleCheckpoints ( string $method, Cartalyst\Sentinel\Users\UserInterface $user = null, boolean $halt = true ) : boolean | Cycles through all the registered checkpoints for a user. Checkpoints may throw their own exceptions, however, if just one returns false, the cycle fails. | |
getUserMethods ( ) : array | Returns all accessible methods on the associated user repository. |
public __construct ( Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface $persistences, Cartalyst\Sentinel\Users\UserRepositoryInterface $users, Cartalyst\Sentinel\Roles\RoleRepositoryInterface $roles, Cartalyst\Sentinel\Activations\ActivationRepositoryInterface $activations, Illuminate\Events\Dispatcher $dispatcher ) : void | ||
$persistences | Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface | |
$users | Cartalyst\Sentinel\Users\UserRepositoryInterface | |
$roles | Cartalyst\Sentinel\Roles\RoleRepositoryInterface | |
$activations | Cartalyst\Sentinel\Activations\ActivationRepositoryInterface | |
$dispatcher | Illuminate\Events\Dispatcher | |
return | void |
public addCheckpoint ( string $key, Cartalyst\Sentinel\Checkpoints\CheckpointInterface $checkpoint ) : void | ||
$key | string | |
$checkpoint | Cartalyst\Sentinel\Checkpoints\CheckpointInterface | |
return | void |
public authenticate ( Cartalyst\Sentinel\Users\UserInterface | array $credentials, boolean $remember = false, boolean $login = true ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
$credentials | Cartalyst\Sentinel\Users\UserInterface | array | |
$remember | boolean | |
$login | boolean | |
return | Cartalyst\Sentinel\Users\UserInterface | boolean |
public authenticateAndRemember ( Cartalyst\Sentinel\Users\UserInterface | array $credentials ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
$credentials | Cartalyst\Sentinel\Users\UserInterface | array | |
return | Cartalyst\Sentinel\Users\UserInterface | boolean |
public checkpointsStatus ( ) : boolean | ||
return | boolean |
public creatingBasicResponse ( Closure $basicResponse ) : void | ||
$basicResponse | Closure | |
return | void |
public disableCheckpoints ( ) : void | ||
return | void |
public enableCheckpoints ( ) : void | ||
return | void |
public forceAuthenticate ( Cartalyst\Sentinel\Users\UserInterface | array $credentials, boolean $remember = false ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
$credentials | Cartalyst\Sentinel\Users\UserInterface | array | |
$remember | boolean | |
return | Cartalyst\Sentinel\Users\UserInterface | boolean |
public forceAuthenticateAndRemember ( Cartalyst\Sentinel\Users\UserInterface | array $credentials ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
$credentials | Cartalyst\Sentinel\Users\UserInterface | array | |
return | Cartalyst\Sentinel\Users\UserInterface | boolean |
public forceCheck ( ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
return | Cartalyst\Sentinel\Users\UserInterface | boolean |
public getActivationRepository ( ) : Cartalyst\Sentinel\Activations\ActivationRepositoryInterface | ||
return | Cartalyst\Sentinel\Activations\ActivationRepositoryInterface |
public getBasicResponse ( ) : mixed | ||
return | mixed |
public getPersistenceRepository ( ) : Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface | ||
return | Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface |
public getReminderRepository ( ) : Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface | ||
return | Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface |
public getRequestCredentials ( ) : array | ||
return | array |
public getRoleRepository ( ) : Cartalyst\Sentinel\Roles\RoleRepositoryInterface | ||
return | Cartalyst\Sentinel\Roles\RoleRepositoryInterface |
public getThrottleRepository ( ) : Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface | ||
return | Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface |
protected getUserMethods ( ) : array | ||
return | array |
public getUserRepository ( ) : Cartalyst\Sentinel\Users\UserRepositoryInterface | ||
return | Cartalyst\Sentinel\Users\UserRepositoryInterface |
public loginAndRemember ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
$user | Cartalyst\Sentinel\Users\UserInterface | |
return | Cartalyst\Sentinel\Users\UserInterface | boolean |
public registerAndActivate ( array $credentials ) : Cartalyst\Sentinel\Users\UserInteface | boolean | ||
$credentials | array | |
return | Cartalyst\Sentinel\Users\UserInteface | boolean |
public removeCheckpoint ( string $key ) : void | ||
$key | string | |
return | void |
public removeCheckpoints ( array $checkpoints = [] ) : void | ||
$checkpoints | array | |
return | void |
public setActivationRepository ( Cartalyst\Sentinel\Activations\ActivationRepositoryInterface $activations ) : void | ||
$activations | Cartalyst\Sentinel\Activations\ActivationRepositoryInterface | |
return | void |
public setPersistenceRepository ( Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface $persistences ) : void | ||
$persistences | Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface | |
return | void |
public setReminderRepository ( Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface $reminders ) : void | ||
$reminders | Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface | |
return | void |
public setRequestCredentials ( Closure $requestCredentials ) : void | ||
$requestCredentials | Closure | |
return | void |
public setRoleRepository ( Cartalyst\Sentinel\Roles\RoleRepositoryInterface $roles ) : void | ||
$roles | Cartalyst\Sentinel\Roles\RoleRepositoryInterface | |
return | void |
public setThrottleRepository ( Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface $throttle ) : void | ||
$throttle | Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface | |
return | void |
public setUserRepository ( Cartalyst\Sentinel\Users\UserRepositoryInterface $users ) : void | ||
$users | Cartalyst\Sentinel\Users\UserRepositoryInterface | |
return | void |
protected ActivationRepositoryInterface,Cartalyst\Sentinel\Activations $activations | ||
return | Cartalyst\Sentinel\Activations\ActivationRepositoryInterface |
protected Closure $basicResponse | ||
return | Closure |
protected array $checkpoints | ||
return | array |
protected bool $checkpointsStatus | ||
return | boolean |
protected PersistenceRepositoryInterface,Cartalyst\Sentinel\Persistences $persistences | ||
return | Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface |
protected ReminderRepositoryInterface,Cartalyst\Sentinel\Reminders $reminders | ||
return | Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface |
protected Closure $requestCredentials | ||
return | Closure |
protected RoleRepositoryInterface,Cartalyst\Sentinel\Roles $roles | ||
return | Cartalyst\Sentinel\Roles\RoleRepositoryInterface |
protected ThrottleRepositoryInterface,Cartalyst\Sentinel\Throttling $throttle | ||
return | Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface |
protected UserInterface,Cartalyst\Sentinel\Users $user | ||
return | Cartalyst\Sentinel\Users\UserInterface |
protected array $userMethods | ||
return | array |