You are here

public function OAuth2ServerRestfulException::__construct in OAuth2 Server 7

File

plugins/authentication/OAuth2ServerRestfulAuthentication.class.php, line 54
Contains RestfulOAuth2Authentication and OAuth2ServerRestfulException.

Class

OAuth2ServerRestfulException
Adapts exceptions from OAuth2 to RESTful formats.

Code

public function __construct(\OAuth2\Response $response) {
  $this->response = $response;
  $this->code = $response
    ->getStatusCode();
  $this->description = $response
    ->getStatusText();
  $this->message = $response
    ->getResponseBody();
}