Skip to main content

Crate grow_casdoor

Crate grow_casdoor 

Source
Expand description

§grow-casdoor

Rust SDK for Casdoor by Grow Codes.

use grow_casdoor::{CasdoorClient, CasdoorConfig};

let client = CasdoorClient::new(CasdoorConfig::from_env()?)?;
let health = client.health().await?;
println!("healthy: {}", health.healthy);
client.close().await;

Features: blocking (a blocking client), testing (in-memory fakes and the conformance runner) .

Re-exports§

pub use crate::core::Error;
pub use crate::core::ErrorCode;
pub use crate::core::HealthStatus;
pub use crate::core::Result;
pub use crate::core::RetryPolicy;
pub use crate::core::Secret;
pub use crate::casdoor::pkce_challenge;
pub use crate::casdoor::random_state;
pub use crate::casdoor::Pkce;
pub use crate::casdoor::TokenSet;

Modules§

blockingblocking
Blocking wrapper (feature blocking). Each client owns a tokio runtime with one worker thread, so background work (log batching, exports, watchers, retries’ timers) keeps running between blocking calls.
casdoor
Casdoor helpers: {"status":"error"} / OAuth error normalization, PKCE, tokens.
core
Shared core: errors, configuration, secrets in config, redaction, retries and transport.
testingtesting
Test support (feature testing): in-memory fakes and the conformance runner (SPEC §6).

Structs§

CasdoorClient
Async client for Casdoor. Cheap to clone (clones share one connection pool).
CasdoorConfig
Immutable client configuration; build it with CasdoorConfig::builder or CasdoorConfig::from_env. Debug output redacts every credential.
CasdoorConfigBuilder
Builder for CasdoorConfig. Values set here win over the environment.
SignInInput
Input of CasdoorClient::sign_in.

Constants§

DEFAULT_SCOPE
Default OAuth scope.
DEFAULT_URL
Endpoint used when neither the builder nor the environment sets one.

Type Aliases§

CasdoorError
Service-prefixed alias of Error.