Свойство | Тип | Описание | |
---|---|---|---|
$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. |
Метод | Описание | |
---|---|---|
__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. |
Метод | Описание | |
---|---|---|
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 | |
Результат | void |
public addCheckpoint ( string $key, Cartalyst\Sentinel\Checkpoints\CheckpointInterface $checkpoint ) : void | ||
$key | string | |
$checkpoint | Cartalyst\Sentinel\Checkpoints\CheckpointInterface | |
Результат | 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 | |
Результат | Cartalyst\Sentinel\Users\UserInterface | boolean |
public authenticateAndRemember ( Cartalyst\Sentinel\Users\UserInterface | array $credentials ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
$credentials | Cartalyst\Sentinel\Users\UserInterface | array | |
Результат | Cartalyst\Sentinel\Users\UserInterface | boolean |
public checkpointsStatus ( ) : boolean | ||
Результат | boolean |
public creatingBasicResponse ( Closure $basicResponse ) : void | ||
$basicResponse | Closure | |
Результат | void |
public disableCheckpoints ( ) : void | ||
Результат | void |
public enableCheckpoints ( ) : void | ||
Результат | 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 | |
Результат | Cartalyst\Sentinel\Users\UserInterface | boolean |
public forceAuthenticateAndRemember ( Cartalyst\Sentinel\Users\UserInterface | array $credentials ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
$credentials | Cartalyst\Sentinel\Users\UserInterface | array | |
Результат | Cartalyst\Sentinel\Users\UserInterface | boolean |
public forceCheck ( ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
Результат | Cartalyst\Sentinel\Users\UserInterface | boolean |
public getActivationRepository ( ) : Cartalyst\Sentinel\Activations\ActivationRepositoryInterface | ||
Результат | Cartalyst\Sentinel\Activations\ActivationRepositoryInterface |
public getBasicResponse ( ) : mixed | ||
Результат | mixed |
public getPersistenceRepository ( ) : Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface | ||
Результат | Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface |
public getReminderRepository ( ) : Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface | ||
Результат | Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface |
public getRequestCredentials ( ) : array | ||
Результат | array |
public getRoleRepository ( ) : Cartalyst\Sentinel\Roles\RoleRepositoryInterface | ||
Результат | Cartalyst\Sentinel\Roles\RoleRepositoryInterface |
public getThrottleRepository ( ) : Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface | ||
Результат | Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface |
protected getUserMethods ( ) : array | ||
Результат | array |
public getUserRepository ( ) : Cartalyst\Sentinel\Users\UserRepositoryInterface | ||
Результат | Cartalyst\Sentinel\Users\UserRepositoryInterface |
public loginAndRemember ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean | ||
$user | Cartalyst\Sentinel\Users\UserInterface | |
Результат | Cartalyst\Sentinel\Users\UserInterface | boolean |
public registerAndActivate ( array $credentials ) : Cartalyst\Sentinel\Users\UserInteface | boolean | ||
$credentials | array | |
Результат | Cartalyst\Sentinel\Users\UserInteface | boolean |
public removeCheckpoint ( string $key ) : void | ||
$key | string | |
Результат | void |
public removeCheckpoints ( array $checkpoints = [] ) : void | ||
$checkpoints | array | |
Результат | void |
public setActivationRepository ( Cartalyst\Sentinel\Activations\ActivationRepositoryInterface $activations ) : void | ||
$activations | Cartalyst\Sentinel\Activations\ActivationRepositoryInterface | |
Результат | void |
public setPersistenceRepository ( Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface $persistences ) : void | ||
$persistences | Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface | |
Результат | void |
public setReminderRepository ( Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface $reminders ) : void | ||
$reminders | Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface | |
Результат | void |
public setRequestCredentials ( Closure $requestCredentials ) : void | ||
$requestCredentials | Closure | |
Результат | void |
public setRoleRepository ( Cartalyst\Sentinel\Roles\RoleRepositoryInterface $roles ) : void | ||
$roles | Cartalyst\Sentinel\Roles\RoleRepositoryInterface | |
Результат | void |
public setThrottleRepository ( Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface $throttle ) : void | ||
$throttle | Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface | |
Результат | void |
public setUserRepository ( Cartalyst\Sentinel\Users\UserRepositoryInterface $users ) : void | ||
$users | Cartalyst\Sentinel\Users\UserRepositoryInterface | |
Результат | void |
protected ActivationRepositoryInterface,Cartalyst\Sentinel\Activations $activations | ||
Результат | Cartalyst\Sentinel\Activations\ActivationRepositoryInterface |
protected Closure $basicResponse | ||
Результат | Closure |
protected array $checkpoints | ||
Результат | array |
protected bool $checkpointsStatus | ||
Результат | boolean |
protected PersistenceRepositoryInterface,Cartalyst\Sentinel\Persistences $persistences | ||
Результат | Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface |
protected ReminderRepositoryInterface,Cartalyst\Sentinel\Reminders $reminders | ||
Результат | Cartalyst\Sentinel\Reminders\ReminderRepositoryInterface |
protected Closure $requestCredentials | ||
Результат | Closure |
protected RoleRepositoryInterface,Cartalyst\Sentinel\Roles $roles | ||
Результат | Cartalyst\Sentinel\Roles\RoleRepositoryInterface |
protected ThrottleRepositoryInterface,Cartalyst\Sentinel\Throttling $throttle | ||
Результат | Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface |
protected UserInterface,Cartalyst\Sentinel\Users $user | ||
Результат | Cartalyst\Sentinel\Users\UserInterface |
protected array $userMethods | ||
Результат | array |