프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$clientCollection | name of the auth client collection application component. It should point to Collection instance. | ||
$clientIdGetParamName | name of the GET param, which is used to passed auth client id to this action. Note: watch for the naming, make sure you do not choose name used in some auth protocol. | ||
$redirectView | name or alias of the view file, which should be rendered in order to perform redirection. If not set - default one will be used. | ||
$successCallback | PHP callback, which should be triggered in case of successful authentication. This callback should accept [[ClientInterface]] instance as an argument. For example: php public function onAuthSuccess($client) { $attributes = $client->getUserAttributes(); user login or signup comes here } If this callback returns [[Response]] instance, it will be used as action response, otherwise redirection to [[successUrl]] will be performed. |
메소드 | 설명 | |
---|---|---|
getCancelUrl ( ) : string | ||
getSuccessUrl ( ) : string | ||
redirect ( mixed $url, boolean $enforceRedirect = true ) : |
Redirect to the given URL or simply close the popup window. | |
redirectCancel ( string $url = null ) : |
Redirect to the [[cancelUrl]] or simply close the popup window. | |
redirectSuccess ( string $url = null ) : |
Redirect to the URL. If URL is null, [[successUrl]] will be used. | |
run ( ) | Runs the action. | |
setCancelUrl ( string $url ) | ||
setSuccessUrl ( string $url ) |
메소드 | 설명 | |
---|---|---|
auth ( mixed $client ) : |
Perform authentication for the given client. | |
authOAuth1 ( |
Performs OAuth1 auth flow. | |
authOAuth2 ( |
Performs OAuth2 auth flow. | |
authOpenId ( |
Performs OpenID auth flow. | |
authSuccess ( yii\authclient\ClientInterface $client ) : |
This method is invoked in case of successful authentication via auth client. | |
defaultCancelUrl ( ) : string | Creates default [[cancelUrl]] value. | |
defaultSuccessUrl ( ) : string | Creates default [[successUrl]] value. |
protected authOAuth1 ( |
||
$client | auth client instance. | |
리턴 | action response. |
protected authOAuth2 ( |
||
$client | auth client instance. | |
리턴 | action response. |
protected authOpenId ( |
||
$client | auth client instance. | |
리턴 | action response. |
protected authSuccess ( yii\authclient\ClientInterface $client ) : |
||
$client | yii\authclient\ClientInterface | auth client instance. |
리턴 | response instance. |
protected defaultCancelUrl ( ) : string | ||
리턴 | string | cancel URL value. |
protected defaultSuccessUrl ( ) : string | ||
리턴 | string | success URL value. |
public redirectCancel ( string $url = null ) : |
||
$url | string | URL to redirect. |
리턴 | response instance. |
public redirectSuccess ( string $url = null ) : |
||
$url | string | URL to redirect. |
리턴 | response instance. |
public $clientCollection |
public $clientIdGetParamName |
public $redirectView |
public $successCallback |