Crate sanctum

Source

Structs§

OAuthResult
OAuthSession
Represents an OAuth2 session This is used to start the OAuth2 flow The auth_url field should be used to redirect the user to the OAuth2 provider The remainder of this session should be stored in the backend and used to complete the authentication when the user is redirected back
Token
Represents a full token

Enums§

AuthError
The general error type for this crate
Id
A general type for user IDs, allows the backend to use either a numeric or text ID as the implementer sees fit
TokenType
The type of token issued
TotpError
Errors associated with using TOTP (two factor authentication)

Traits§

Backend
The backend trait, implement this for your backend
OAuthProvider
Implement this trait for each OAuth2 Provider and provide the required configuration constants