Skip to content

common_auth.interfaces

Small injected ports; no provider discovery or secret-manager access.

Classes

CredentialSource

Bases: Protocol

Resolve an exact reference through a source configured by the application.

get

async def get(reference: CredentialRef) -> AuthResult[Credential]

SessionProvider

Bases: Protocol

Provider owns its UI/protocol steps; Session owns operation policy.

check

async def check(session: SessionRef) -> AuthResult[SessionState]

start

async def start(session: SessionRef) -> AuthResult[SessionState]

stop

async def stop(session: SessionRef) -> AuthResult[SessionState]

TokenSource

Bases: Protocol

Read usable access values; protected evidence follows the source capability.

get

async def get(*, force_refresh: bool = False, rejected_token: AccessToken | SecretStr | str | None = None) -> AuthResult[AccessToken]