Skip to main content

greentic_oauth_sdk/
lib.rs

1#[cfg(not(target_arch = "wasm32"))]
2mod client;
3#[cfg(target_arch = "wasm32")]
4mod client_wasm;
5mod error;
6mod types;
7#[cfg(not(target_arch = "wasm32"))]
8mod validator;
9
10#[cfg(not(target_arch = "wasm32"))]
11pub use client::Client;
12#[cfg(target_arch = "wasm32")]
13pub use client_wasm::Client;
14
15pub use error::SdkError;
16pub use greentic_oauth_core::{AccessToken, OAuthError, OAuthResult, ValidatedClaims};
17#[cfg(not(target_arch = "wasm32"))]
18pub use greentic_oauth_host::linker as oauth_broker_wit;
19#[cfg(not(target_arch = "wasm32"))]
20pub use greentic_oauth_host::{
21    OAuthBroker, OauthBrokerHost, request_distributor_token, request_git_token, request_oci_token,
22    request_repo_token, request_scanner_token,
23};
24pub use types::{
25    ClientConfig, FlowResult, InitiateAuthRequest, InitiateAuthResponse, OwnerKind,
26    SignedFetchRequest, SignedFetchResponse, Visibility,
27};
28#[cfg(not(target_arch = "wasm32"))]
29pub use validator::{TokenValidationConfig, validate_bearer_token};
30
31#[cfg(target_arch = "wasm32")]
32pub use http::Method;
33#[cfg(not(target_arch = "wasm32"))]
34pub use reqwest::Method;