PHP Класс Webiny\Component\Security\Authentication\Providers\Http\Http

Наследование: implements Webiny\Component\Security\Authentication\Providers\AuthenticationInterface, use trait Webiny\Component\Http\HttpTrait
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getLoginObject ( ConfigObject $config ) : Login This method is triggered on the login submit page where user credentials are submitted.
invalidLoginProvidedCallback ( ) This callback is triggered after we validate the given login data, and the data is not valid.
loginSuccessfulCallback ( AbstractUser $user ) This callback is triggered after we have validated user credentials.
logoutCallback ( ) Logout callback is called when user auth token was deleted.
setExitTrigger ( string $trigger ) Set the function which will trigger the end of process.
triggerLogin ( ConfigObject $config ) : mixed This method is triggered when the user opens the login page.
userAuthorizedByTokenCallback ( AbstractUser $user, Token $token ) : mixed This callback is triggered when the system has managed to retrieve the user from the stored token (either session) or cookie.

Приватные методы

Метод Описание
triggerExit ( ) Triggers the exit process from Http authentication process.

Описание методов

getLoginObject() публичный Метод

On this page the provider should create a new Login object from those credentials, and return the object. This object will be then validated my user providers.
public getLoginObject ( ConfigObject $config ) : Login
$config Webiny\Component\Config\ConfigObject Firewall config
Результат Webiny\Component\Security\Authentication\Providers\Login

invalidLoginProvidedCallback() публичный Метод

Use this callback to clear the submit data from the previous request so that you don't get stuck in an infinitive loop between login and login submit page.

loginSuccessfulCallback() публичный Метод

This callback is triggered after we have validated user credentials.
public loginSuccessfulCallback ( AbstractUser $user )
$user Webiny\Component\Security\User\AbstractUser

logoutCallback() публичный Метод

Logout callback is called when user auth token was deleted.
public logoutCallback ( )

setExitTrigger() публичный Метод

Set the function which will trigger the end of process.
public setExitTrigger ( string $trigger )
$trigger string Name of the trigger function. Possible values are "die" or "exception".

triggerLogin() публичный Метод

On this page you must ask the user to provide you his credentials which should then be passed to the login submit page.
public triggerLogin ( ConfigObject $config ) : mixed
$config Webiny\Component\Config\ConfigObject Firewall config
Результат mixed

userAuthorizedByTokenCallback() публичный Метод

This callback is triggered when the system has managed to retrieve the user from the stored token (either session) or cookie.
public userAuthorizedByTokenCallback ( AbstractUser $user, Token $token ) : mixed
$user Webiny\Component\Security\User\AbstractUser
$token Webiny\Component\Security\Token\Token
Результат mixed