openstackid/app/libs/oauth2/responses/OAuth2DirectErrorResponse.php
smarcet ad1844984e Implements: blueprint openid-oauth2-implicit-client-flow
Change-Id: Iee3c9412a3f75a4aba5421e8c5f881a60b396df0
2014-01-06 18:07:55 -03:00

15 lines
460 B
PHP

<?php
namespace oauth2\responses;
use oauth2\OAuth2Protocol;
class OAuth2DirectErrorResponse extends OAuth2DirectResponse {
public function __construct($error)
{
// Error Response: A server receiving an invalid request MUST send a
// response with an HTTP status code of 400.
parent::__construct(self::HttpErrorResponse, self::DirectResponseContentType);
$this[OAuth2Protocol::OAuth2Protocol_Error] = $error;
}
}