forked from trikoder/oauth2-bundle
-
Notifications
You must be signed in to change notification settings - Fork 2
/
OAuth2Grants.php
57 lines (48 loc) · 1.24 KB
/
OAuth2Grants.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
<?php
declare(strict_types=1);
namespace Trikoder\Bundle\OAuth2Bundle;
final class OAuth2Grants
{
/**
* @see https://tools.ietf.org/html/rfc6749#section-1.3.1
*
* @var string
*/
public const AUTHORIZATION_CODE = 'authorization_code';
/**
* @see https://tools.ietf.org/html/rfc6749#section-1.3.4
*
* @var string
*/
public const CLIENT_CREDENTIALS = 'client_credentials';
/**
* @see https://tools.ietf.org/html/rfc6749#section-1.3.2
*
* @var string
*/
public const IMPLICIT = 'implicit';
/**
* @see https://tools.ietf.org/html/rfc6749#section-1.3.3
*
* @var string
*/
public const PASSWORD = 'password';
/**
* @see https://tools.ietf.org/html/rfc6749#section-6
*
* @var string
*/
public const REFRESH_TOKEN = 'refresh_token';
public const WITH_REFRESH_TOKEN = [
'authorization_code',
'password',
'refresh_token',
];
public const ALL = [
self::AUTHORIZATION_CODE => 'authorization code',
self::CLIENT_CREDENTIALS => 'client credentials',
self::IMPLICIT => 'implicit',
self::PASSWORD => 'password',
self::REFRESH_TOKEN => 'refresh token',
];
}