Metadata-Version: 2.3
Name: lks-idprovider-api
Version: 0.1.6
Summary: Pure API specification for LKS Identity Provider library with protocols, models, and contracts
License: LKSISL
Author: Raul Medeiros
Author-email: rmedeiros@lksnext.com
Requires-Python: >=3.11
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: pydantic (>=2.0.0,<3.0.0)
Requires-Dist: pyright (>=1.1.402,<2.0.0)
Requires-Dist: typing-extensions (>=4.0.0)
Project-URL: Documentation, https://github.com/lksnext/lks-idprovider-python#readme
Project-URL: Homepage, https://github.com/lksnext/lks-idprovider-python
Project-URL: Issues, https://github.com/lksnext/lks-idprovider-python/issues
Project-URL: Repository, https://github.com/lksnext/lks-idprovider-python
Description-Content-Type: text/markdown

# LKS-idprovider API


 API specification for the LKS Identity Provider library, providing protocols, models, and contracts for identity provider implementations.

## Overview

This package contains the core API specification for the LKS-idprovider ecosystem:

- **Protocols**: Define contracts for identity provider implementations
- **Models**: Data models for authentication context, identities, tokens, and configuration
- **Types**: Enums and type definitions for consistency across implementations
- **Contracts**: Validation and lifecycle contracts for provider compliance

## Key Features

- **Unified Identity Model**: Support for both user and client identities through a common interface
- **Protocol-Based Design**: Clear contracts for implementing identity providers
- **Type Safety**: Full type hints and Pydantic models for validation
- **Framework Agnostic**: Pure API specification without implementation dependencies
- **Extensible**: Easy to extend for custom identity providers and use cases


## Core Components

### Protocols

- **IdentityProvider**: Main protocol for token validation and authentication
- **ClientCredentialsProvider**: Protocol for OAuth2 client credentials flow
- **TokenValidator**: Protocol for token validation logic

### Models

- **AuthContext**: Complete authentication context with identity and authorization info
- **Identity**: Base class for all identities (users and clients)
- **User**: Represents authenticated users with profile information
- **ClientIdentity**: Represents authenticated clients (service-to-service)
- **Role**: User roles and permissions
- **Token**: Token information and metadata

### Configuration

- **ProviderConfig**: Base configuration for identity providers
- **Validation contracts**: Ensure provider implementations meet requirements

