forked from Flowpack/Flowpack.OAuth2.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTokenEndpointInterface.php
59 lines (51 loc) · 2.66 KB
/
TokenEndpointInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
namespace Flowpack\OAuth2\Client\Endpoint;
/* *
* This script belongs to the TYPO3 Flow package "Flowpack.OAuth2.Client".*
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License, either version 3 of the *
* License, or (at your option) any later version. *
* *
* The TYPO3 project - inspiring people to share! *
* */
use Neos\Flow\Annotations as Flow;
/**
*/
interface TokenEndpointInterface
{
const GRANT_TYPE_AUTHORIZATION_CODE = 'authorization_code';
const GRANT_TYPE_CLIENT_CREDENTIALS = 'client_credentials';
/**
* Requests an access token for Client Credentials Grant as specified in section 4.4.2
*
* @param string $code The authorization code received from the authorization server.
* @param string $redirectUri REQUIRED, if the "redirect_uri" parameter was included in the authorization request as described in Section 4.1.1, and their values MUST be identical.
* @param string $clientIdentifier REQUIRED, if the client is not authenticating with the authorization server as described in Section 3.2.1.
* @return mixed
* @see http://tools.ietf.org/html/rfc6749#section-4.1.3
*/
public function requestAuthorizationCodeGrantAccessToken($code, $redirectUri = null, $clientIdentifier = null);
/**
* Requests an access token for Resource Owner Password Credentials Grant as specified in section 4.3.2
*
* @param string $username The resource owner username.
* @param string $password The resource owner password.
* @param array $scope The scope of the access request as described by http://tools.ietf.org/html/rfc6749#section-3.3
* @return mixed
* @see http://tools.ietf.org/html/rfc6749#section-4.3.2
*/
public function requestResourceOwnerPasswordCredentialsGrantAccessToken($username, $password, $scope = array());
/**
* Requests an access token for Client Credentials Grant as specified in section 4.4.2
*
* @param array $scope The scope of the access request as described by http://tools.ietf.org/html/rfc6749#section-3.3
* @return mixed
* @see http://tools.ietf.org/html/rfc6749#section-4.4.2
*/
public function requestClientCredentialsGrantAccessToken($scope = array());
/**
* @return string
*/
public function __toString();
}