1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00
kanboard_ynh/sources/vendor/OAuth/OAuth2/Service/ServiceInterface.php
mbugeia 5e51bcd6e9 Init files + sources
Kanboard 1.0.6
2014-07-20 12:26:15 +02:00

37 lines
1.1 KiB
PHP

<?php
namespace OAuth\OAuth2\Service;
use OAuth\Common\Consumer\CredentialsInterface;
use OAuth\Common\Storage\TokenStorageInterface;
use OAuth\Common\Token\TokenInterface;
use OAuth\Common\Http\Client\ClientInterface;
use OAuth\Common\Http\Exception\TokenResponseException;
use OAuth\Common\Service\ServiceInterface as BaseServiceInterface;
use OAuth\Common\Http\Uri\UriInterface;
/**
* Defines the common methods across OAuth 2 services.
*/
interface ServiceInterface extends BaseServiceInterface
{
/**
* Authorization methods for various services
*/
const AUTHORIZATION_METHOD_HEADER_OAUTH = 0;
const AUTHORIZATION_METHOD_HEADER_BEARER = 1;
const AUTHORIZATION_METHOD_QUERY_STRING = 2;
const AUTHORIZATION_METHOD_QUERY_STRING_V2 = 3;
const AUTHORIZATION_METHOD_QUERY_STRING_V3 = 4;
/**
* Retrieves and stores/returns the OAuth2 access token after a successful authorization.
*
* @param string $code The access code from the callback.
*
* @return TokenInterface $token
*
* @throws TokenResponseException
*/
public function requestAccessToken($code);
}