- Browser session contract with HttpOnly=True and SameSite - Configurable Secure cookie flag - Session fixation barrier rotating session ID on login - Session lifecycle, expiration, and safe rejection of tampered cookies - Logout endpoint (/birthday/api/auth/logout) revoking session and clearing cookie (Max-Age=0) - Unit and integration tests in backend/tests/test_session_management.py
45 lines
985 B
Python
45 lines
985 B
Python
"""Authentication package providing domain models, hexagonal ports, and OIDC client."""
|
|
|
|
from .oidc import (
|
|
InvalidNonceError,
|
|
InvalidStateError,
|
|
OIDCAuthAdapter,
|
|
OIDCClient,
|
|
OIDCConfig,
|
|
OIDCDiscovery,
|
|
OIDCError,
|
|
OIDCTransaction,
|
|
SessionRecord,
|
|
TokenValidationError,
|
|
claims_to_identity,
|
|
extract_identity_from_claims,
|
|
generate_code_challenge,
|
|
generate_code_verifier,
|
|
generate_nonce,
|
|
generate_state,
|
|
resolve_claim_path,
|
|
)
|
|
from .port import AuthPort, Identity
|
|
|
|
__all__ = [
|
|
"AuthPort",
|
|
"Identity",
|
|
"InvalidNonceError",
|
|
"InvalidStateError",
|
|
"OIDCAuthAdapter",
|
|
"OIDCClient",
|
|
"OIDCConfig",
|
|
"OIDCDiscovery",
|
|
"OIDCError",
|
|
"OIDCTransaction",
|
|
"SessionRecord",
|
|
"TokenValidationError",
|
|
"claims_to_identity",
|
|
"extract_identity_from_claims",
|
|
"generate_code_challenge",
|
|
"generate_code_verifier",
|
|
"generate_nonce",
|
|
"generate_state",
|
|
"resolve_claim_path",
|
|
]
|