Expand description
Minimal and safe by default client library for the Rauthy project.
You can of course use any generic OIDC client with Rauthy. However, the idea of this crate is to provide the simplest possible production ready setup, with the least amount of overhead and secure default values, if you only use Rauthy anyway.
You can find examples for actix-web, axum or a fully generic framework / application in the
Examples directory.
§Features
actix-webenables actix-web specific extractors and apiaxumenables axum specific extractors and apibackchannel-logoutaddsLogoutToken+ validation functions for OIDC Backchannel Logoutdevice-codeadds everything you need to the device code flow. This will most probably be used without default features.qrcodebrings QR Code generation in combination with thedevice-codefeaturescimadds types and helpers to implement the client side of SCIM v2 in a Rauthy-compatible wayuserinfoadds additional types and helpers to easily fetch the/userinfoendpoint and actively validate against it.
Modules§
- backchannel_
logout backchannel-logout - OIDC Backchannel Logout
- cookie_
state - Handles the encrypted OIDC state cookie for the login flow
- device_
code device-code - Device Code Flow: urn:ietf:params:oauth:grant-type:device_code
- handler
- The api which need to be called from your endpoints
- oidc_
config - The Rauthy OIDC config
- principal
- The authenticated Principal, extracted from valid JWT tokens
- provider
- Rauthy / OIDC provider config and setup
- rauthy_
error - scim
scim - SCIM v2 types for full compatibility with Rauthy
- token_
set - Provides everything necessary to extract and validate JWT token claims
- tokens
Structs§
- Root
Certificate - Represents a server X509 certificate.
Enums§
Functions§
- base64_
url_ no_ pad_ decode_ buf - extract_
token_ claims - Extracts the claims from a given token into the given struct. CAUTION: Does not validate the token!
- generate_
pkce_ challenge - Generates a secure random pkce s256 challenge and returns
(verifier, challenge) - init
- The init function must be called exactly once during your app start up before(!) the OidcProvider::setup_*() function. It will initialize variables, clients, cache, and validate the OIDC configuration.
- init_
with - This function must be called exactly once during your app start up before(!) the OidcProvider::setup_*() function. It will initialize variables, clients, cache, and validate the OIDC configuration.
- secure_
random - Generates a secure random alphanumeric value with the given length.