/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { OpenAPIV3 } from 'openapi-types'; type Oauth2Flow = OpenAPIV3.OAuth2SecurityScheme['flows']; /** * OpenIdConnectWithConfig extends OpenIdSecurityScheme with additional * configuration options. */ export interface OpenIdConnectWithConfig extends OpenAPIV3.OpenIdSecurityScheme { authorizationEndpoint: string; tokenEndpoint: string; userinfoEndpoint?: string; revocationEndpoint?: string; tokenEndpointAuthMethodsSupported?: string[]; grantTypesSupported?: string[]; scopes?: string[]; } /** * AuthSchemes contains SecuritySchemes from OpenAPI 3.0 and an extra flattened * OpenIdConnectWithConfig. */ export type AuthScheme = OpenAPIV3.SecuritySchemeObject | OpenIdConnectWithConfig; /** * Represents the OAuth2 flow (or grant type). */ export declare enum OAuthGrantType { CLIENT_CREDENTIALS = "client_credentials", AUTHORIZATION_CODE = "authorization_code", IMPLICIT = "implicit", PASSWORD = "password" } /** * Converts an OAuthFlows object to a OAuthGrantType. */ export declare function getOAuthGrantTypeFromFlow(flow: Oauth2Flow): OAuthGrantType | undefined; export {};