Свойство | Type | Description | |
---|---|---|---|
$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. |
Méthode | Description | |
---|---|---|
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 ) |
Méthode | Description | |
---|---|---|
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. | |
Résultat | action response. |
protected authOAuth2 ( |
||
$client | auth client instance. | |
Résultat | action response. |
protected authOpenId ( |
||
$client | auth client instance. | |
Résultat | action response. |
protected authSuccess ( yii\authclient\ClientInterface $client ) : |
||
$client | yii\authclient\ClientInterface | auth client instance. |
Résultat | response instance. |
protected defaultCancelUrl ( ) : string | ||
Résultat | string | cancel URL value. |
protected defaultSuccessUrl ( ) : string | ||
Résultat | string | success URL value. |
public redirect ( mixed $url, boolean $enforceRedirect = true ) : |
||
$url | mixed | URL to redirect, could be a string or array config to generate a valid URL. |
$enforceRedirect | boolean | indicates if redirect should be performed even in case of popup window. |
Résultat | response instance. |
public redirectCancel ( string $url = null ) : |
||
$url | string | URL to redirect. |
Résultat | response instance. |
public redirectSuccess ( string $url = null ) : |
||
$url | string | URL to redirect. |
Résultat | response instance. |
public $clientCollection |
public $clientIdGetParamName |
public $redirectView |
public $successCallback |