pub struct SmartIDConfig {
pub root_url: String,
pub api_path: String,
pub scheme_name: SchemeName,
pub relying_party_uuid: String,
pub relying_party_name: String,
pub client_request_timeout: Option<u64>,
pub long_polling_timeout: u64,
}Expand description
Smart ID Client Configuration
This struct holds the configuration details required to interact with the Smart ID service. It includes the root URL, API path, relying party UUID, relying party name, and an optional client request timeout.
This can be loaded from environment variables using the load_from_env method.
§Properties
root_url- The base URL of the Smart ID service, e.g.,https://sid.sk.ee.api_path- The API path to be appended to the root URL, e.g.,/v3.scheme_version- The scheme/environment to use, e.g smart-id (production) or smart-id-demo (demo).relying_party_uuid- The UUID of the relying party, obtained from Smart ID.relying_party_name- The name of the relying party, obtained from Smart ID.client_request_timeout- An optional timeout for client requests, in milliseconds. This is not used for the long-polling status request.
Fields§
§root_url: String§api_path: String§scheme_name: SchemeName§relying_party_uuid: String§relying_party_name: String§client_request_timeout: Option<u64>§long_polling_timeout: u64Implementations§
Source§impl SmartIDConfig
impl SmartIDConfig
Sourcepub fn load_from_env() -> Result<SmartIDConfig>
pub fn load_from_env() -> Result<SmartIDConfig>
Loads the Smart ID configuration from environment variables.
§Returns
Ok(SmartIDConfig)- If all required environment variables are present and valid.Err(anyhow::Error)- If any required environment variable is missing or invalid.
Trait Implementations§
Source§impl Clone for SmartIDConfig
impl Clone for SmartIDConfig
Source§fn clone(&self) -> SmartIDConfig
fn clone(&self) -> SmartIDConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SmartIDConfig
impl RefUnwindSafe for SmartIDConfig
impl Send for SmartIDConfig
impl Sync for SmartIDConfig
impl Unpin for SmartIDConfig
impl UnsafeUnpin for SmartIDConfig
impl UnwindSafe for SmartIDConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more