paperap.auth module
METADATA:
- File: auth.py
Project: paperap
- Created: 2025-03-04
Version: 0.0.9
Author: Jess Mann Email: jess@jmann.me
Copyright (c) 2025 Jess Mann
LAST MODIFIED:
2025-03-04 By Jess Mann
- class paperap.auth.AuthBase(**data)[source]
-
Base authentication class.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'str_strip_whitespace': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class paperap.auth.TokenAuth(**data)[source]
Bases:
AuthBaseAuthentication using a token.
- Parameters:
data (
Any)
- token: Annotated[str, Field(min_length=30, max_length=75, pattern='^[a-zA-Z0-9]+$')]
- model_config: ClassVar[ConfigDict] = {'str_strip_whitespace': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class paperap.auth.BasicAuth(**data)[source]
Bases:
AuthBaseAuthentication using username and password.
- Parameters:
data (
Any)
- username: str
- password: str
- get_auth_headers()[source]
Get headers for basic auth.
Basic auth is handled by the requests library, so no headers are needed here.
- model_config: ClassVar[ConfigDict] = {'str_strip_whitespace': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].