Skip to main content

authplane_sdk/
lib.rs

1pub mod auth;
2pub mod auth_provider;
3pub mod cache;
4pub mod circuit_breaker;
5pub mod circuit_policy;
6pub mod client;
7pub mod client_builder;
8pub mod consent_elicitation;
9pub mod constants;
10pub mod dpop;
11pub mod dpop_provider;
12pub mod dpop_replay;
13pub mod errors;
14pub mod fetch_settings;
15pub mod inbound_dpop;
16mod json_util;
17pub mod metadata;
18mod metadata_binding;
19pub mod oauth;
20pub mod prm;
21pub mod resource;
22#[doc(hidden)]
23pub mod three_mode_dpop_docs;
24mod time_utils;
25pub mod transport;
26pub mod verified_claims;
27pub mod www_authenticate;
28
29pub use auth::AuthplaneAuth;
30pub use auth_provider::{AuthProvider, ClientCredentialsProvider};
31pub use cache::{
32    CachedToken, DocumentFetcher, JwksCache, MetadataCache, MetadataChangeCallback, TokenCache,
33};
34pub use circuit_breaker::{CircuitBreaker, CircuitState};
35pub use circuit_policy::should_open_circuit_for_oauth_error;
36pub use client::AuthplaneClient;
37pub use client_builder::AuthplaneClientBuilder;
38pub use consent_elicitation::{
39    DEFAULT_CONSENT_MESSAGE, UNKNOWN_SERVICE_ID, UrlElicitationPayload,
40    build_url_elicitation_payload,
41};
42pub use dpop::{
43    DpopProofOptions, DpopRequestContext, DpopVerificationOptions, DpopVerificationOptionsOwned,
44    SUPPORTED_DPOP_ALGORITHMS, VerifiedDpopProof, create_dpop_proof, dpop_ath,
45    jwk_thumbprint_sha256, verify_dpop_proof, verify_dpop_proof_with_jkt_and_replay,
46    verify_dpop_proof_with_replay,
47};
48pub use dpop_provider::{DpopNonceStore, DpopProvider, InMemoryDpopNonceStore};
49pub use dpop_replay::{DpopReplayStore, InMemoryDpopReplayStore};
50pub use errors::{AuthError, AuthplaneError, ConsentRequiredError, map_oauth_error};
51pub use fetch_settings::FetchSettings;
52pub use inbound_dpop::{InboundDPoPOptions, InboundDPoPOptionsError};
53pub use metadata::{AuthorizationServerMetadata, build_metadata_url};
54pub use oauth::{
55    GRANT_TYPE_TOKEN_EXCHANGE, IntrospectionResponse, TOKEN_TYPE_ACCESS_TOKEN,
56    TokenExchangeOptions, TokenResponse, parse_token_exchange_error, parse_token_response_dpop,
57};
58pub use prm::{ProtectedResourceMetadata, build_prm, build_prm_url};
59pub use resource::{AuthplaneResource, ResourceOptions, ResourceOptionsError, RevocationConfig};
60pub use verified_claims::{VerifiedClaims, VerifierError};
61pub use www_authenticate::{
62    http_status, http_status_for_auth_error, is_dpop_error, www_authenticate,
63    www_authenticate_for_missing_credentials, www_authenticate_with_resource_metadata,
64};