Crate auth0_client

Source
Expand description

§auth0_client_rs

CI codecov

This crates allow to interact with the Auth0 API. It is still a work in progress and therefore misses lot of functionnalities.

§Installation

Add this line to your Cargo.toml:

[dependencies]
auth0_client = "0.1.0"

§Usage overview

let mut client = Auth0Client::new(
    "client_id",
    "client_secret",
    "http://domain.com",
    "http://audience.com",
);

client.authenticate().await?;

let mut payload =
    CreateUserPayload::from_connection("Username-Password-Authentication");
payload.email = Some("test@example.com".to_owned());
payload.password = Some("password123456789!".to_owned());

let new_user = client.create_user(&payload).await;

Modules§

authorization
Types, traits and functions relative to authentication process.
error
Types relative to error handling.
users
Types, traits and functions relative to the users API.

Structs§

Auth0Client
The client used to make requests towards the Auth0 API.
ValidJWT
Representation of a decoded and validated JSON Web Token.

Enums§

GrantType
The grant type to use when authenticating.
JWTValidation
Possible token claim validations. This enumeration only covers common use-cases, for other types of validations the user is encouraged to inspect the claim set manually.