Merge pull request #2668 from dizews/patch-1

Update HttpBearerAuth.php
This commit is contained in:
Alexander Makarov
2014-03-08 20:12:51 +03:00

View File

@@ -46,7 +46,7 @@ class HttpBearerAuth extends Component implements AuthInterface
*/ */
public function handleFailure($response) public function handleFailure($response)
{ {
$response->getHeaders()->set('WWW-Authenticate', "Basic realm=\"{$this->realm}\""); $response->getHeaders()->set('WWW-Authenticate', "Bearer realm=\"{$this->realm}\"");
throw new UnauthorizedHttpException('You are requesting with an invalid access token.'); throw new UnauthorizedHttpException('You are requesting with an invalid access token.');
} }
} }