poiesis.api.auth.providers package

Submodules

poiesis.api.auth.providers.auth module

Base class for authentication providers.

class poiesis.api.auth.providers.auth.AuthProvider[source]

Bases: object

Abstract base class for authentication providers.

abstractmethod validate_token(token)[source]

Validate a token and return user information.

Return type:

dict[str, Any]

poiesis.api.auth.providers.dummy module

Dummy authentication provider.

class poiesis.api.auth.providers.dummy.DummyAuthProvider[source]

Bases: AuthProvider

Dummy authentication provider.

Validate any token and return a -1 user id.

validate_token(token)[source]

Validate any token and return user information.

Return type:

dict[str, Any]

poiesis.api.auth.providers.oidc module

OpenIDConnectAuthProvider.

class poiesis.api.auth.providers.oidc.OpenIDConnectAuthProvider(*args: Any, **kwargs: Any)[source]

Bases: AuthProvider

Generic OpenID Connect authentication provider.

validate_token(token)[source]

Validates an OIDC ID token.

This method checks the token’s signature, issuer, audience, and expiration. Tries local validation first, falls back to introspection if needed.

Return type:

dict[str, Any]

class poiesis.api.auth.providers.oidc.SingletonMeta[source]

Bases: type

Singleton metaclass for OpenIDConnectAuthProvider.

Module contents

Authentication providers.