|
| 1 | +<?php declare(strict_types=1); |
| 2 | + |
| 3 | +namespace Pdsinterop\Solid\Auth\Enum\OAuth2; |
| 4 | + |
| 5 | +use Pdsinterop\Solid\Auth\Enum\AbstractEnum; |
| 6 | + |
| 7 | +/** |
| 8 | + * OAuth Parameters |
| 9 | + * |
| 10 | + * The keys/values come from the following specifications: |
| 11 | + * |
| 12 | + * - European Telecommunications Standards Institute (ETSI) Network Functions Virtualization (NFV) Security |
| 13 | + * - OpenID - OAuth 2.0 Multiple Response Type Encoding Practices |
| 14 | + * - OpenID - OpenID Connect (OIDC) Core 1.0 |
| 15 | + * - OpenID - OpenID Connect Session Management 1.0 |
| 16 | + * - RFC6749 - The OAuth 2.0 Authorization Framework |
| 17 | + * - RFC7521 - Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants |
| 18 | + * - RFC7636 - OAuth Proof Key for Code Exchange (PKCE) |
| 19 | + * - RFC8485 - Vectors of Trust (vot) |
| 20 | + * - RFC8628 - OAuth 2.0 Device Authorization (DA) Grant |
| 21 | + * - RFC8693 - OAuth 2.0 Token Exchange |
| 22 | + * - RFC8707 - Resource Indicators for OAuth 2.0 |
| 23 | + * - User-Managed Access (UMA) 2.0 Grant for OAuth 2.0 Authorization |
| 24 | + * |
| 25 | + * @see https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#parameters |
| 26 | + */ |
| 27 | +class Parameter extends AbstractEnum |
| 28 | +{ |
| 29 | + // RFC7649 - OAuth2: authorization response, token response |
| 30 | + public const ACCESS_TOKEN = 'access_token'; |
| 31 | + |
| 32 | + // OpenID - OIDC Core: authorization request |
| 33 | + public const ACR_VALUES = 'acr_values'; |
| 34 | + |
| 35 | + // RFC8693 - OAuth2 Token Exchange: token request |
| 36 | + public const ACTOR_TOKEN = 'actor_token'; |
| 37 | + |
| 38 | + // RFC8693 - OAuth2 Token Exchange: token request |
| 39 | + public const ACTOR_TOKEN_TYPE = 'actor_token_type'; |
| 40 | + |
| 41 | + // RFC7521 - OAuth2 Assertions: token request |
| 42 | + public const ASSERTION = 'assertion'; |
| 43 | + |
| 44 | + // RFC8693 - OAuth2 Token Exchange: token request |
| 45 | + public const AUDIENCE = 'audience'; |
| 46 | + |
| 47 | + // UMA Grant: client request, token endpoint |
| 48 | + public const CLAIM_TOKEN = 'claim_token'; |
| 49 | + |
| 50 | + // OpenID - OIDC Core: authorization request |
| 51 | + public const CLAIMS = 'claims'; |
| 52 | + |
| 53 | + // OpenID - OIDC Core: authorization request |
| 54 | + public const CLAIMS_LOCALES = 'claims_locales'; |
| 55 | + |
| 56 | + // RFC7521 - OAuth2 Assertions: token request |
| 57 | + public const CLIENT_ASSERTION = 'client_assertion'; |
| 58 | + |
| 59 | + // RFC7521 - OAuth2 Assertions: token request |
| 60 | + public const CLIENT_ASSERTION_TYPE = 'client_assertion_type'; |
| 61 | + |
| 62 | + // RFC7649 - OAuth2: authorization request, token request |
| 63 | + public const CLIENT_ID = 'client_id'; |
| 64 | + |
| 65 | + // RFC7649 - OAuth2: token request |
| 66 | + public const CLIENT_SECRET = 'client_secret'; |
| 67 | + |
| 68 | + // RFC7649 - OAuth2: authorization response, token request |
| 69 | + public const CODE = 'code'; |
| 70 | + |
| 71 | + // RFC7636 - PKCE: authorization request |
| 72 | + public const CODE_CHALLENGE = 'code_challenge'; |
| 73 | + |
| 74 | + // RFC7636 - PKCE: authorization request |
| 75 | + public const CODE_CHALLENGE_METHOD = 'code_challenge_method'; |
| 76 | + |
| 77 | + // RFC7636 - PKCE: token request |
| 78 | + public const CODE_VERIFIER = 'code_verifier'; |
| 79 | + |
| 80 | + // RFC8628 - DA Grant: token request |
| 81 | + public const DEVICE_CODE = 'device_code'; |
| 82 | + |
| 83 | + // OpenID - OIDC Core: authorization request |
| 84 | + public const DISPLAY = 'display'; |
| 85 | + |
| 86 | + // RFC7649 - OAuth2: authorization response, token response |
| 87 | + public const ERROR = 'error'; |
| 88 | + |
| 89 | + // RFC7649 - OAuth2: authorization response, token response |
| 90 | + public const ERROR_DESCRIPTION = 'error_description'; |
| 91 | + |
| 92 | + // RFC7649 - OAuth2: authorization response, token response |
| 93 | + public const ERROR_URI = 'error_uri'; |
| 94 | + |
| 95 | + // RFC7649 - OAuth2: authorization response, token response |
| 96 | + public const EXPIRES_IN = 'expires_in'; |
| 97 | + |
| 98 | + // RFC7649 - OAuth2: token request |
| 99 | + public const GRANT_TYPE = 'grant_type'; |
| 100 | + |
| 101 | + // OpenID - OIDC Core: authorization response, access token response |
| 102 | + public const ID_TOKEN = 'id_token'; |
| 103 | + |
| 104 | + // OpenID - OIDC Core: authorization request |
| 105 | + public const ID_TOKEN_HINT = 'id_token_hint'; |
| 106 | + |
| 107 | + // RFC8693 - OAuth2 Token Exchange: token response |
| 108 | + public const ISSUED_TOKEN_TYPE = 'issued_token_type'; |
| 109 | + |
| 110 | + // OpenID - OIDC Core: authorization request |
| 111 | + public const LOGIN_HINT = 'login_hint'; |
| 112 | + |
| 113 | + // OpenID - OIDC Core: authorization request |
| 114 | + public const MAX_AGE = 'max_age'; |
| 115 | + |
| 116 | + // ETSI - NFV-SEC: Access Token Response |
| 117 | + public const NFV_TOKEN = 'nfv_token'; |
| 118 | + |
| 119 | + // OpenID - OIDC Core: authorization request |
| 120 | + public const NONCE = 'nonce'; |
| 121 | + |
| 122 | + // RFC7649 - OAuth2: token request |
| 123 | + public const PASSWORD = 'password'; |
| 124 | + |
| 125 | + // UMA Grant: authorization server response, token endpoint |
| 126 | + // UMA Grant: client request, token endpoint |
| 127 | + public const PCT = 'pct'; |
| 128 | + |
| 129 | + // OpenID - OIDC Core: authorization request |
| 130 | + public const PROMPT = 'prompt'; |
| 131 | + |
| 132 | + // RFC7649 - OAuth2: authorization request, token request |
| 133 | + public const REDIRECT_URI = 'redirect_uri'; |
| 134 | + |
| 135 | + // RFC7649 - OAuth2: token request, token response |
| 136 | + public const REFRESH_TOKEN = 'refresh_token'; |
| 137 | + |
| 138 | + // OpenID - OIDC Core: authorization request |
| 139 | + public const REGISTRATION = 'registration'; |
| 140 | + |
| 141 | + // OpenID - OIDC Core: authorization request |
| 142 | + public const REQUEST = 'request'; |
| 143 | + |
| 144 | + // OpenID - OIDC Core: authorization request |
| 145 | + public const REQUEST_URI = 'request_uri'; |
| 146 | + |
| 147 | + // RFC8693 - OAuth2 Token Exchange: token request |
| 148 | + public const REQUESTED_TOKEN_TYPE = 'requested_token_type'; |
| 149 | + |
| 150 | + // RFC8707 - Oauth2 Resource Indicators: authorization request, token request |
| 151 | + public const RESOURCE = 'resource'; |
| 152 | + |
| 153 | + // OpenID - OAuth2 Response Types: Authorization Request |
| 154 | + public const RESPONSE_MODE = 'response_mode'; |
| 155 | + |
| 156 | + // RFC7649 - OAuth2: authorization request |
| 157 | + public const RESPONSE_TYPE = 'response_type'; |
| 158 | + |
| 159 | + // UMA Grant: client request, token endpoint |
| 160 | + public const RPT = 'rpt'; |
| 161 | + |
| 162 | + // RFC7649 - OAuth2: authorization request, authorization response, token request, token response |
| 163 | + public const SCOPE = 'scope'; |
| 164 | + |
| 165 | + // OpenID - OIDC Sessions: authorization response, access token response |
| 166 | + public const SESSION_STATE = 'session_state'; |
| 167 | + |
| 168 | + // RFC7649 - OAuth2: authorization request, authorization response |
| 169 | + public const STATE = 'state'; |
| 170 | + |
| 171 | + // RFC8693 - OAuth2 Token Exchange: token request |
| 172 | + public const SUBJECT_TOKEN = 'subject_token'; |
| 173 | + |
| 174 | + // RFC8693 - OAuth2 Token Exchange: token request |
| 175 | + public const SUBJECT_TOKEN_TYPE = 'subject_token_type'; |
| 176 | + |
| 177 | + // UMA Grant: client request, token endpoint |
| 178 | + public const TICKET = 'ticket'; |
| 179 | + |
| 180 | + // RFC7649 - OAuth2: authorization response, token response |
| 181 | + public const TOKEN_TYPE = 'token_type'; |
| 182 | + |
| 183 | + // OpenID - OIDC Core: authorization request |
| 184 | + public const UI_LOCALES = 'ui_locales'; |
| 185 | + |
| 186 | + // UMA Grant: authorization server response, token endpoint |
| 187 | + public const UPGRADED = 'upgraded'; |
| 188 | + |
| 189 | + // RFC7649 - OAuth2: token request |
| 190 | + public const USERNAME = 'username'; |
| 191 | + |
| 192 | + // RFC8485 - Vectors of Trust: authorization request, token request |
| 193 | + public const VTR = 'vtr'; |
| 194 | +} |
0 commit comments