src/AuthorizeFilter.php
public function finishAuthorization()
    {
        /** @var Authorization $responseType */
        $responseType = $this->getResponseType();
        if (Yii::$app->user->isGuest) {
            $responseType->errorRedirect(Yii::t('conquer/oauth2', 'The User denied access to your application.'), Exception::ACCESS_DENIED);
        }
        $parts = $responseType->getResponseData();

        $redirectUri = http_build_url($responseType->redirect_uri, $parts, HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT);

        if (isset($parts['fragment'])) {
            $redirectUri .= '#' . $parts['fragment'];
        }

        Yii::$app->response->redirect($redirectUri);
    }
public function finishAuthorization()
    {
        /** @var Authorization $responseType */
        $responseType = $this->getResponseType();
        if (Yii::$app->user->isGuest) {
            $responseType->errorRedirect(Yii::t('conquer/oauth2', 'The User denied access to your application.'), Exception::ACCESS_DENIED);
        }
        $parts = $responseType->getResponseData();

        $redirectUri = http_build_url($responseType->redirect_uri, $parts, HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT);

        if (isset($parts['fragment'])) {
            $redirectUri .= '#' . $parts['fragment'];
        }

        Yii::$app->response->redirect($redirectUri);
    }
public function finishAuthorization ( ) { /** @var Authorization $responseType */ $ responseType = $ this -> getResponseType ( ) ; if ( Yii :: $ app -> user -> isGuest ) { $ responseType -> errorRedirect ( Yii :: t ( 'conquer/oauth2' , 'The User denied access to your application.' ) , Exception :: ACCESS_DENIED ) ; } $ parts = $ responseType -> getResponseData ( ) ; $ redirectUri = http_build_url ( $ responseType -> redirect_uri , $ parts , HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT ) ; if ( isset ( $ parts [ 'fragment' ] ) ) { $ redirectUri .= '#' . $ parts [ 'fragment' ] ; } Yii :: $ app -> response -> redirect ( $ redirectUri ) ; }
Finish oauth authorization.
Builds redirect uri and performs redirect.
If user is not logged on, redirect contains the Access Denied Error
Finish oauth authorization . Builds redirect uri and performs redirect . If user is not logged on redirect contains the Access Denied Error