Skip to main content

Crate rauthy_client

Crate rauthy_client 

Source
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-web enables actix-web specific extractors and api
  • axum enables axum specific extractors and api
  • backchannel-logout adds LogoutToken + validation functions for OIDC Backchannel Logout
  • device-code adds everything you need to the device code flow. This will most probably be used without default features.
  • qrcode brings QR Code generation in combination with the device-code feature
  • scim adds types and helpers to implement the client side of SCIM v2 in a Rauthy-compatible way
  • userinfo adds additional types and helpers to easily fetch the /userinfo endpoint and actively validate against it.

Modules§

backchannel_logoutbackchannel-logout
OIDC Backchannel Logout
cookie_state
Handles the encrypted OIDC state cookie for the login flow
device_codedevice-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
scimscim
SCIM v2 types for full compatibility with Rauthy
token_set
Provides everything necessary to extract and validate JWT token claims
tokens

Structs§

RootCertificate
Represents a server X509 certificate.

Enums§

DangerAcceptInvalidCerts
RauthyHttpsOnly

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.