protected function authOpenId($client)
    {
        $request = Yii::$app->getRequest();
        $mode = $request->get('openid_mode', $request->post('openid_mode'));

        if (empty($mode)) {
            $url = $client->buildAuthUrl();
            return Yii::$app->getResponse()->redirect($url);
        }

        switch ($mode) {
            case 'id_res':
                if ($client->validate()) {
                    return $this->authSuccess($client);
                }
                throw new HttpException(400, 'Unable to complete the authentication because the required data was not received.');
            case 'cancel':
                return $this->authCancel($client);
            default:
                throw new HttpException(400);
        }
    }
protected function authOpenId($client)
    {
        $request = Yii::$app->getRequest();
        $mode = $request->get('openid_mode', $request->post('openid_mode'));

        if (empty($mode)) {
            $url = $client->buildAuthUrl();
            return Yii::$app->getResponse()->redirect($url);
        }

        switch ($mode) {
            case 'id_res':
                if ($client->validate()) {
                    return $this->authSuccess($client);
                }
                throw new HttpException(400, 'Unable to complete the authentication because the required data was not received.');
            case 'cancel':
                return $this->authCancel($client);
            default:
                throw new HttpException(400);
        }
    }
protected function authOpenId ( $ client ) { $ request = Yii :: $ app -> getRequest ( ) ; $ mode = $ request -> get ( 'openid_mode' , $ request -> post ( 'openid_mode' ) ) ; if ( empty ( $ mode ) ) { $ url = $ client -> buildAuthUrl ( ) ; return Yii :: $ app -> getResponse ( ) -> redirect ( $ url ) ; } switch ( $ mode ) { case 'id_res' : if ( $ client -> validate ( ) ) { return $ this -> authSuccess ( $ client ) ; } throw new HttpException ( 400 , 'Unable to complete the authentication because the required data was not received.' ) ; case 'cancel' : return $ this -> authCancel ( $ client ) ; default : throw new HttpException ( 400 ) ; } }
Performs OpenID auth flow.
@param OpenId $client auth client instance.
@return Response action response.
@throws Exception on failure.
@throws HttpException on failure.
Performs OpenID auth flow .