Skip to content

Commit

Permalink
feat(RESTOAuth2): add RESTPostOAuth2TokenRevocationQuery (#1050)
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsundso authored Aug 14, 2024
1 parent ea1a6c3 commit 6ead98b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions deno/rest/v10/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery {
prompt?: 'consent' | 'none';
}

/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
*/
export interface RESTPostOAuth2TokenRevocationQuery {
token: string;
token_type_hint?: 'access_token' | 'refresh_token';
}

/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
*/
Expand Down
8 changes: 8 additions & 0 deletions deno/rest/v9/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery {
prompt?: 'consent' | 'none';
}

/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
*/
export interface RESTPostOAuth2TokenRevocationQuery {
token: string;
token_type_hint?: 'access_token' | 'refresh_token';
}

/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
*/
Expand Down
8 changes: 8 additions & 0 deletions rest/v10/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery {
prompt?: 'consent' | 'none';
}

/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
*/
export interface RESTPostOAuth2TokenRevocationQuery {
token: string;
token_type_hint?: 'access_token' | 'refresh_token';
}

/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
*/
Expand Down
8 changes: 8 additions & 0 deletions rest/v9/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery {
prompt?: 'consent' | 'none';
}

/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
*/
export interface RESTPostOAuth2TokenRevocationQuery {
token: string;
token_type_hint?: 'access_token' | 'refresh_token';
}

/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
*/
Expand Down

0 comments on commit 6ead98b

Please sign in to comment.