PHP Class Webiny\Component\Security\Authentication\Providers\Form\Form

Use this provider if you have a HTML login form for your users to sign in.
Inheritance: implements Webiny\Component\Security\Authentication\Providers\AuthenticationInterface, use trait Webiny\Component\Http\HttpTrait
Afficher le fichier Open project: Webiny/Framework Class Usage Examples

Méthodes publiques

Méthode Description
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 from getLoginObject, and the data IS NOT valid.
loginSuccessfulCallback ( AbstractUser $user ) This callback is triggered after we have validated user credentials and have created a user auth token.
logoutCallback ( ) Logout callback is called when user auth token was deleted.
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.

Method Details

getLoginObject() public méthode

On this page the provider should create a new Login object from those credentials, and return the object. This object will be then validated by user providers.
public getLoginObject ( ConfigObject $config ) : Login
$config Webiny\Component\Config\ConfigObject Firewall config
Résultat Webiny\Component\Security\Authentication\Providers\Login

invalidLoginProvidedCallback() public méthode

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 page and login submit page.

loginSuccessfulCallback() public méthode

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

logoutCallback() public méthode

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

userAuthorizedByTokenCallback() public méthode

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
Résultat mixed