Expand description
Builds the authenticated FHIR HTTP client used by commands that talk to a server
(api, testscript, hl7v2), based on the active profileβs auth mode.
Re-exportsΒ§
use crate::cli::config::DEFAULT_CLIENT_CREDENTIALS_SCOPE;πuse crate::cli::config::ProfileAuth;πuse crate::cli::secrets::StoredTokens;πuse crate::cli::state::CliState;πuse crate::cli::state::SECRETS_LOCATION;πuse haste_fhir_client::http::BasicCredentials;πuse haste_fhir_client::http::FHIRHttpAuthenticationMethod;πuse haste_fhir_client::http::FHIRHttpClient;πuse haste_fhir_client::http::FHIRHttpState;πuse haste_fhir_client::http::HttpRequestHeaders;πuse haste_fhir_model::r4::generated::terminology::IssueType;πuse haste_fhir_operation_error::OperationOutcomeError;πuse haste_server::auth_n::oidc::routes::discovery::WellKnownDiscoveryDocument;πuse serde::Deserialize;πuse serde::Deserialize;πuse std::sync::Arc;πuse std::time::SystemTime;πuse std::time::UNIX_EPOCH;πuse tokio::sync::Mutex;π
StructsΒ§
- Token
Response πBody
ConstantsΒ§
- TOKEN_
EXPIRY_ πMARGIN_ SECS - How long before expiry a cached token stops being handed out.
FunctionsΒ§
- cached_
access_ πtoken - The cached access token, if it is still good.
- config_
to_ πfhir_ http_ state - fetch_
discovery_ πdocument - Fetches (and caches on
CliState) the OIDC discovery document for the active profile. - fhir_
client π - refresh_
access_ πtoken - Exchanges a refresh token for a new access token, persisting the refreshed tokens to disk.
- unix_
now π