LightOpenId authentication


I want to add Steam authentication to my website using LightOpenId solution. Checked it using example on GitHub and it works fine, however, I can’t get it to work with Yii, namely, it doesn’t redirects to Steam login page. Here is some code:

public function actionLogin()
    $openid = new LightOpenID('');
    if (!$openid->mode)
        $openid->verify_peer = false;
        $openid->identity = ''; 
        //header('Location: '.$openid->authUrl());   **// 1**
        $headers = Yii::$app->response->headers; **// 2**
    else {
        if ($openid->validate())
            // some code to read Steam information


I have marked a line from original example on GitHub (Header('Location: .$openid->authUrl()) which I expected would redirect to the Steam login page, but it didn’t.

I also tried to set header in Yii response object, but it didn’t help neighter :frowning:

What am I doing wrong?

Best regards,

All right, I got it -> instead of sending header, I used $this->redirect() method.