Skip to main content

Crate fabryk_auth

Crate fabryk_auth 

Source
Expand description

Generic authentication primitives for Fabryk.

Provides:

Structs§

AuthConfig
Configuration for the auth middleware.
AuthLayer
Tower Layer that wraps services with token authentication.
AuthService
Tower Service that validates tokens before forwarding requests.
AuthenticatedUser
An authenticated user identity, extracted from a validated token.

Enums§

AuthError
Errors that can occur during authentication.

Traits§

TokenValidator
Trait for validating tokens and extracting user identity.

Functions§

email_from_parts
Extract the user’s email from HTTP request Parts.
user_from_parts
Extract the AuthenticatedUser from HTTP request Parts, if present.