ldap-matter/oauth/OAuth2/ResponseInterface.php

54 lines
1.2 KiB
PHP
Raw Normal View History

2017-08-08 03:01:11 +08:00
<?php
namespace OAuth2;
/**
* Interface which represents an object response. Meant to handle and display the proper OAuth2 Responses
* for errors and successes
*
2020-04-30 21:43:07 +08:00
* @see \OAuth2\Response
2017-08-08 03:01:11 +08:00
*/
interface ResponseInterface
{
2020-04-30 21:43:07 +08:00
/**
* @param array $parameters
*/
2017-08-08 03:01:11 +08:00
public function addParameters(array $parameters);
2020-04-30 21:43:07 +08:00
/**
* @param array $httpHeaders
*/
2017-08-08 03:01:11 +08:00
public function addHttpHeaders(array $httpHeaders);
2020-04-30 21:43:07 +08:00
/**
* @param int $statusCode
*/
2017-08-08 03:01:11 +08:00
public function setStatusCode($statusCode);
2020-04-30 21:43:07 +08:00
/**
* @param int $statusCode
* @param string $name
* @param string $description
* @param string $uri
* @return mixed
*/
2017-08-08 03:01:11 +08:00
public function setError($statusCode, $name, $description = null, $uri = null);
2020-04-30 21:43:07 +08:00
/**
* @param int $statusCode
* @param string $url
* @param string $state
* @param string $error
* @param string $errorDescription
* @param string $errorUri
* @return mixed
*/
2017-08-08 03:01:11 +08:00
public function setRedirect($statusCode, $url, $state = null, $error = null, $errorDescription = null, $errorUri = null);
2020-04-30 21:43:07 +08:00
/**
* @param string $name
* @return mixed
*/
2017-08-08 03:01:11 +08:00
public function getParameter($name);
}