OAuthFlow
Enum that defines the OAuth 2.0 authentication flows that can be implemented in a BDK project.
Enum Definition
from enum import Enum
class OAuthFlow(Enum):
"""Represents the different OAuth 2.0 flow types."""
AUTHORIZATION_CODE = 0
CLIENT_CREDENTIALS = 1
Enum Members
Member | Value | Description |
---|---|---|
AUTHORIZATION_CODE | 0 | Used for an authorization code flow. |
CLIENT_CREDENTIALS | 1 | Used for a client credentials flow. |
Example Usage
@oauth(
id="oauth",
provider=OAuthProvider.MICROSOFT,
flows=[OAuthFlow.AUTHORIZATION_CODE],
authorize_endpoint="https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/authorize",
token_endpoint="https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token",
scopes=[
"https://graph.microsoft.com/Files.ReadWrite",
"https://graph.microsoft.com/Sites.ReadWrite.All",
],
)
@book(name="MicrosoftBook")
class BaseMicrosoftBook
See Also
Updated about 1 month ago