-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OAuthFlow.php
93 lines (82 loc) · 2.81 KB
/
OAuthFlow.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
namespace Zerotoprod\DataModelOpenapi30;
use Zerotoprod\DataModel\Describe;
use Zerotoprod\DataModelOpenapi30\Helpers\DataModel;
/**
* Configuration details for a supported OAuth Flow
*
* @link https://spec.openapis.org/oas/v3.0.4.html#oauth-flow-object
*/
class OAuthFlow
{
use DataModel;
/**
* **REQUIRED**. The authorization URL to be used for this flow. This
* _MUST_ be in the form of a URL. The OAuth2 standard requires the
* use of TLS.
*
* @link https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-25
* @see $authorizationUrl
*/
public const authorizationUrl = 'authorizationUrl';
/**
* **REQUIRED**. The authorization URL to be used for this flow. This
* _MUST_ be in the form of a URL. The OAuth2 standard requires the
* use of TLS.
*
* @link https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-25
*/
#[Describe(['required'])]
public string $authorizationUrl;
/**
* **REQUIRED**. The token URL to be used for this flow. This _MUST_ be
* in the form of a URL. The OAuth2 standard requires the use of TLS.
*
* @link https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-25
* @see $tokenUrl
*/
public const tokenUrl = 'tokenUrl';
/**
* **REQUIRED**. The token URL to be used for this flow. This _MUST_ be
* in the form of a URL. The OAuth2 standard requires the use of TLS.
*
* @link https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-25
*/
#[Describe(['nullable'])]
public ?string $tokenUrl;
/**
* The URL to be used for obtaining refresh tokens. This _MUST_ be in the
* form of a URL. The OAuth2 standard requires the use of TLS.
*
* @link https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-25
* @see $refreshUrl
*/
public const refreshUrl = 'refreshUrl';
/**
* The URL to be used for obtaining refresh tokens. This _MUST_ be in the
* form of a URL. The OAuth2 standard requires the use of TLS.
*
* @link https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-25
*/
public ?string $refreshUrl = null;
/**
* **REQUIRED**. The available scopes for the OAuth2 security scheme.
* A map between the scope name and a short description for it.
* The map _MAY_ be empty.
*
* @link https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-25
* @see $scopes
*/
public const scopes = 'scopes';
/**
* **REQUIRED**. The available scopes for the OAuth2 security scheme.
* A map between the scope name and a short description for it.
* The map _MAY_ be empty.
*
* @var array<string, string> $scopes
*
* @link https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-25
*/
#[Describe(['required'])]
public array $scopes;
}