authkestra-core
Core traits and data structures for the authkestra-rs ecosystem.
This crate provides the foundational types and traits used across the authkestra framework, ensuring a consistent API for authentication providers, session stores, and identity management.
Features
Identitystructure for unified user information across different providers.OAuthTokenstructure for standard OAuth2 token responses.OAuthProvidertrait for implementing OAuth2-compatible authentication providers.CredentialsProvidertrait for password-based or custom credential authentication.UserMappertrait for mapping provider identities to local application users.pkcemodule for Proof Key for Code Exchange support.- Standard
AuthErrorenum for consistent error handling.
Usage
Add this to your Cargo.toml:
[]
= "0.1.0"
Core Traits
OAuthProvider
The OAuthProvider trait defines the interface for OAuth2 providers. It includes methods for generating authorization URLs and exchanging codes for identities.
CredentialsProvider
The CredentialsProvider trait is used for non-OAuth authentication methods, such as email/password.
UserMapper
The UserMapper trait allows you to bridge the gap between a provider's Identity and your application's local user model.
Part of authkestra-rs
This crate is part of the authkestra-rs workspace. authkestra is a modular, framework-agnostic authentication orchestration system for Rust.