From f4002e559e64a43c3efeee780006dbe04de59d3e Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Tue, 18 Feb 2025 09:24:51 +0000 Subject: [PATCH] Add type definition for token revocation requests --- src/shared/auth.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/shared/auth.ts b/src/shared/auth.ts index e1e65067..be1500c7 100644 --- a/src/shared/auth.ts +++ b/src/shared/auth.ts @@ -102,10 +102,19 @@ export const OAuthClientRegistrationErrorSchema = z.object({ error_description: z.string().optional(), }).strip(); +/** + * RFC 7009 OAuth 2.0 Token Revocation request + */ +export const OAuthTokenRevocationRequestSchema = z.object({ + token: z.string(), + token_type_hint: z.string().optional(), +}).strip(); + export type OAuthMetadata = z.infer; export type OAuthTokens = z.infer; export type OAuthError = z.infer; export type OAuthClientMetadata = z.infer; export type OAuthClientInformation = z.infer; export type OAuthClientInformationFull = z.infer; -export type OAuthClientRegistrationError = z.infer; \ No newline at end of file +export type OAuthClientRegistrationError = z.infer; +export type OAuthTokenRevocationRequest = z.infer; \ No newline at end of file