Crate mz_frontegg_client

source ·
Expand description

A Frontegg client to interact with the Admin API.

§Example

use mz_frontegg_client::client::{Client};
use mz_frontegg_client::config::{ClientBuilder, ClientConfig};
use mz_frontegg_auth::AppPassword;

let app_password = AppPassword {
    client_id: "client-id".parse().unwrap(),
    secret_key: "client-secret".parse().unwrap(),
};

let config = ClientConfig { app_password };

let client = ClientBuilder::default()
    .build(config);

let response = client.list_app_passwords().await?;

§Implementation

It is divided into three modules: client, config, error

§Error

The error crate contains the definitions and structures for all possible errors.

§Client

The Frontegg API capabilities are provided by the client module, which currently only enables listing or creating users and passwords.

§Config

The client’s builder, instantiation and configuration reside in the config module. Every client requires an optional endpoint, otherwise, you can use the default.

§Note

This crate is implemented following a similar pattern to rust-orb-billing and rust-frontegg.

Modules§

  • Frontegg API client
  • This module defines the configuration and builder structs for the Frontegg Client.
  • This module defines custom error types and structs related to Frontegg API.
  • parse 🔒