-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
85 changed files
with
2,401 additions
and
1,354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Token endpoint request parameters used in the "Authorization Code" and "Authorization code with PKCE" flows | ||
* with the `authorization_code` grant type | ||
* | ||
*/ | ||
interface AuthCodeTokenRequest { | ||
/** | ||
* Grant type | ||
*/ | ||
grant_type?: 'authorization_code'; | ||
|
||
/** | ||
* For `authorization_code` grant type only. User's authorization code | ||
* Required | ||
*/ | ||
code?: string; | ||
|
||
/** | ||
* For `authorization_code` grant type only. This is a callback URI which determines where the response | ||
* is sent. The value of this parameter must exactly match one of | ||
* the URIs you have provided for your app upon registration | ||
* Format: uri | ||
*/ | ||
redirect_uri?: string; | ||
|
||
/** | ||
* For `authorization_code` grant type only. | ||
* The code verifier as defined by the PKCE specification - | ||
* [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) | ||
*/ | ||
code_verifier?: string; | ||
} | ||
|
||
export default AuthCodeTokenRequest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/** | ||
* Query parameters for operation authorize | ||
*/ | ||
interface AuthorizeParameters { | ||
/** | ||
* The registered identifier of a client application | ||
* Example: AZwEVwGEcfGet2PCouA7K6 | ||
*/ | ||
client_id?: string; | ||
|
||
/** | ||
* Determines authorization flow type. The only supported value is `code` which corresponds to OAuth 2.0 "Authorization Code Flow" | ||
*/ | ||
response_type?: 'code'; | ||
|
||
/** | ||
* This is the URI where the Authorization Server redirects the User Agent to at the end of the authorization flow. | ||
* The value of this parameter must exactly match one of the URIs registered for this client application. | ||
* This parameter is required if there are more than one redirect URIs registered for the app. | ||
* Format: uri | ||
*/ | ||
redirect_uri?: string; | ||
|
||
/** | ||
* An opaque value used by the client to maintain state between the request and callback. | ||
* The authorization server includes this value when redirecting the User Agent back | ||
* to the client. The parameter SHOULD be used for preventing cross-site request forgery attacks. | ||
*/ | ||
state?: string; | ||
|
||
/** | ||
* The list of space separated application permissions (OAuth scopes) | ||
*/ | ||
scope?: string; | ||
|
||
/** | ||
* Specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. | ||
* Default: page | ||
*/ | ||
display?: 'page' | 'popup' | 'touch' | 'mobile'; | ||
|
||
/** | ||
* Space-delimited, case-sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for | ||
* re-authentication and consent. The defined values are: | ||
* | ||
* - `login` - RingCentral native login form, | ||
* - `sso` - Single Sign-On login form, | ||
* - `consent` - form to show the requested scope and prompt user for consent. | ||
* | ||
* Either `login` or `sso` (or both) must be specified. The default | ||
* value is `login sso` | ||
* Default: login sso | ||
*/ | ||
prompt?: string; | ||
|
||
/** | ||
* End-User's preferred languages and scripts for the user interface, represented as a space-separated list of | ||
* [RFC-5646](https://datatracker.ietf.org/doc/html/rfc5646) language tag values, ordered by preference. | ||
* | ||
* If this parameter is provided, its value overrides 'Accept-Language' header value and 'localeId' parameter value (if any) | ||
* Example: en-US | ||
*/ | ||
ui_locales?: string; | ||
|
||
/** | ||
* DEPRECATED: `ui_locales` parameter should be used instead | ||
* Example: en-US | ||
*/ | ||
localeId?: string; | ||
|
||
/** | ||
* The code challenge value as defined by the PKCE specification - | ||
* [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) | ||
*/ | ||
code_challenge?: string; | ||
|
||
/** | ||
* The code challenge method as defined by the PKCE specification - | ||
* [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) | ||
* Default: plain | ||
*/ | ||
code_challenge_method?: 'plain' | 'S256'; | ||
|
||
/** | ||
* String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token. | ||
*/ | ||
nonce?: string; | ||
|
||
/** | ||
* Login form user interface options (space-separated). By default, the UI options that are registered for this client application will be used | ||
*/ | ||
ui_options?: string; | ||
|
||
/** | ||
* Hint to the Authorization Server about the login identifier the End-User might use to log in. | ||
*/ | ||
login_hint?: string; | ||
|
||
/** | ||
* RingCentral Brand identifier. If it is not provided in the request, | ||
* server will try to determine brand from the client application profile. | ||
* Example: 1210 | ||
*/ | ||
brand_id?: string; | ||
} | ||
|
||
export default AuthorizeParameters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.