app.schemas.auth

Request and response models for identity, dev tokens and poll triggers.

class app.schemas.auth.ReviewerOut(*, eligible, reason)

Bases: BaseModel

Whether the caller may record approval decisions, and why.

model_config: ClassVar[ConfigDict] = {'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

eligible: bool
reason: str
class app.schemas.auth.MeOut(*, issuer, subject, display, email, roles, permissions, reviewer)

Bases: BaseModel

The authenticated caller and what they may do.

issuer: str
subject: str
display: str
email: str | None
roles: list[str]
permissions: list[Permission]
reviewer: ReviewerOut
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class app.schemas.auth.DevTokenIn(*, sub, name=None, email=None, roles=<factory>)

Bases: BaseModel

Identity to put into a dev token.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

sub: str
name: str | None
email: str | None
roles: list[str]
class app.schemas.auth.DevTokenOut(*, access_token, token_type='Bearer', expires_in)

Bases: BaseModel

A minted dev access token (OAuth 2 token-response shape).

access_token: str
token_type: str
expires_in: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class app.schemas.auth.DevRoleOut(*, name, permissions)

Bases: BaseModel

One rbac role of the loaded catalog and what it grants.

model_config: ClassVar[ConfigDict] = {'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
permissions: list[Permission]
class app.schemas.auth.DevRolesOut(*, roles, reviewer_roles)

Bases: BaseModel

Role names of the loaded catalog, for dev sign-in presets.

model_config: ClassVar[ConfigDict] = {'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

roles: list[DevRoleOut]
reviewer_roles: list[str]
class app.schemas.auth.PollAcceptedOut(*, accepted, message)

Bases: BaseModel

An accepted background poll.

accepted: list[str]
message: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].