@oauth
Overview
The @oauth
decorator is used to apply OAuth-based authentication to classes. It adds OAuth-specific metadata, such as endpoints, arguments, and provider details, to the class, enabling integration with OAuth services.
Syntax
Parameters
Parameter
Type
Required
Description
id
str
Yes
The unique identifier for the OAuth configuration.
provider
Yes
The OAuth provider:
OAuthProvider.MICROSOFT
OAuthProvider.GOOGLE
flows
Optional
A list of OAuth flows.
authorize_endpoint
str
Yes
The authorization endpoint URL for the OAuth provider.
token_endpoint
str
Yes
The token endpoint URL for exchanging the authorization code for a token.
scopes
List[str]
Optional
A list of scopes required by the OAuth provider for the authenticated requests.
Example
Last updated
Was this helpful?