authplane-sdk 0.1.0

Authplane Rust SDK core primitives.
Documentation

authplane-sdk

crates.io docs.rs

Framework-agnostic Rust primitives for Authplane OAuth flows, token verification, and DPoP.

What is included

  • Typed OAuth errors, including ConsentRequiredError.
  • OAuth error mapping utility from token responses.
  • Circuit policy helper with shared defaults (5 failures, 30s cooldown).

Install

cargo add authplane-sdk

Quickstart

use authplane_sdk::parse_token_exchange_error;

let err = parse_token_exchange_error(
    Some(400),
    r#"{
        "error":"consent_required",
        "error_description":"Consent is required",
        "service_id":"drive",
        "consent_url":"https://example.com/consent"
    }"#,
);

println!("{err}");

See the user guide for AuthplaneClient, token verification, DPoP, fetch settings, and error handling.