OAuthProvider

Enum that represents the supported OAuth 2.0 providers for authentication in BDK.

Enum Definition

from enum import Enum

class OAuthProvider(Enum):
  	"""Represents the supported OAuth 2.0 providers."""
    MICROSOFT = 0
    GOOGLE = 1

Enum Members

MemberValueDescription
MICROSOFT0Represents Microsoft as an OAuth 2.0 provider.
GOOGLE1Represents Google as an OAuth 2.0 provider.

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