Skip to main content

fakts.registry

GrantType Objects​

class GrantType(str, Enum)

The grant type

CLIENT_CREDENTIALS​

The client credentials grant

AUTHORIZATION_CODE​

The authorization code grant

GrantRegistry Objects​

class GrantRegistry(BaseModel)

A registry for grants.

This registry is used to register grants. It is used by the fakts grant to build the correct grant from the fakts.

register_grant​

def register_grant(grant_type: GrantType, grant: GrantBuilder) -> None

Registers a grant.

Arguments:


  • type - GrantType The type of the grant to register
  • grant - Type[BaseGrant] The grant to register

get_grant_for_type​

def get_grant_for_type(grant_type: GrantType) -> GrantBuilder

Gets the grant for a type.

Arguments:


  • type - GrantType The type of the grant to get

Returns:


Type[BaseGrant] The grant for the type

Config Objects​

class Config()

Pydantic config