1: <?php declare(strict_types=1);
2:
3: namespace Salient\Http\OAuth2;
4:
5: /**
6: * @api
7: */
8: interface HasGrantType
9: {
10: /**
11: * Authorization code
12: *
13: * - \[RFC6749] Section 4.1 ("Authorization Code Grant")
14: * - \[OpenID.Core] Section 3.1 ("Authentication using the Authorization
15: * Code Flow")
16: * - \[OpenID.Core] Section 3.3 ("Authentication using the Hybrid Flow")
17: */
18: public const GRANT_AUTHORIZATION_CODE = 'authorization_code';
19:
20: /**
21: * Resource owner password
22: *
23: * - \[RFC6749] Section 4.3 ("Resource Owner Password Credentials Grant")
24: */
25: public const GRANT_PASSWORD = 'password';
26:
27: /**
28: * Client credentials
29: *
30: * - \[RFC6749] Section 4.4 ("Client Credentials Grant")
31: */
32: public const GRANT_CLIENT_CREDENTIALS = 'client_credentials';
33:
34: /**
35: * Device code
36: *
37: * - \[RFC8628] ("OAuth 2.0 Device Authorization Grant")
38: */
39: public const GRANT_DEVICE_CODE = 'urn:ietf:params:oauth:grant-type:device_code';
40:
41: /**
42: * Refresh token
43: *
44: * - \[RFC6749] Section 6 ("Refreshing an Access Token")
45: */
46: public const GRANT_REFRESH_TOKEN = 'refresh_token';
47: }
48: