PHP 클래스 Webiny\Component\Security\Authentication\Providers\OAuth2\OAuth2

상속: implements Webiny\Component\Security\Authentication\Providers\AuthenticationInterface, use trait Webiny\Component\StdLib\StdLibTrait, use trait Webiny\Component\Http\HttpTrait, use trait Webiny\Component\Crypt\CryptTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $serverName, string | array $roles ) Base constructor.
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.
setExitTrigger ( string $trigger ) Set the function which will trigger the end of process.
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.

비공개 메소드들

메소드 설명
createOAuth2State ( )
getOAuth2Instance ( ) : array | null | OAuth2
triggerExit ( $msg ) Triggers the exit process from OAuth2 authentication process.

메소드 상세

__construct() 공개 메소드

Base constructor.
public __construct ( string $serverName, string | array $roles )
$serverName string Name of the OAuth2 server in the current configuration.
$roles string | array Roles that will be set for the OAuth2 users.

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

loginSuccessfulCallback() 공개 메소드

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() 공개 메소드

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".

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