Skip to main content

Crate rs_auth

Crate rs_auth 

Source
Expand description

Composable authentication for Rust.

rs-auth is a facade crate that re-exports rs_auth_core (always), rs_auth_postgres (behind the postgres feature), and rs_auth_axum (behind the axum feature).

§Quick start

[dependencies]
rs-auth = { version = "0.1", features = ["postgres", "axum"] }

Re-exports§

pub use rs_auth_core as core;
pub use rs_auth_postgres as postgres;
pub use rs_auth_axum as axum;

Modules§

config
crypto
email
error
oauth
service
store
types

Structs§

AuthConfig
Top-level authentication configuration.
AuthService
Core authentication service. Generic over storage backends and email sender.
CookieConfig
HTTP cookie configuration.
EmailConfig
Email behavior configuration.
LoginResult
Result returned by AuthService::login.
RequestResetResult
Result returned by AuthService::request_password_reset.
ResetPasswordResult
Result returned by AuthService::reset_password.
SessionResult
Result returned by AuthService::get_session.
SignupResult
Result returned by AuthService::signup.
VerifyEmailResult
Result returned by AuthService::verify_email.

Enums§

AuthError
Authentication error types.
SameSite
SameSite cookie attribute.

Traits§

OAuthStateStore
Storage backend for transient OAuth state records.