pub struct OnesOidcConfig {
pub http_timeout: Duration,
pub user_agent: Option<String>,
pub jwt_expiration_secs: u64,
pub signing_service_url: String,
pub validate_jwt_audience: bool,
pub max_discovery_retries: u32,
pub discovery_backoff: Duration,
}Expand description
Configuration for the OIDC client Configuration for the ONES OIDC client
Fields§
§http_timeout: DurationHTTP timeout duration
user_agent: Option<String>User agent string for HTTP requests
jwt_expiration_secs: u64JWT expiration time in seconds
signing_service_url: StringURL for the device identity signing service
validate_jwt_audience: boolWhether to validate JWT audience (default: false for compatibility)
max_discovery_retries: u32Maximum number of retries for OIDC discovery (0 = no retries)
discovery_backoff: DurationInitial backoff duration for discovery retries (doubles each retry)
Implementations§
Source§impl OnesOidcConfig
impl OnesOidcConfig
Sourcepub fn with_timeout(timeout: Duration) -> Self
pub fn with_timeout(timeout: Duration) -> Self
Create a new configuration with custom HTTP timeout
Sourcepub fn with_signing_service_url(url: String) -> Self
pub fn with_signing_service_url(url: String) -> Self
Create a new configuration with custom signing service URL
Sourcepub fn with_jwt_audience_validation(enabled: bool) -> Self
pub fn with_jwt_audience_validation(enabled: bool) -> Self
Create a new configuration with JWT audience validation enabled
Sourcepub fn with_jwt_expiration(expiration_secs: u64) -> Self
pub fn with_jwt_expiration(expiration_secs: u64) -> Self
Create a new configuration with custom JWT expiration time
Sourcepub fn signing_service_url(self, url: String) -> Self
pub fn signing_service_url(self, url: String) -> Self
Builder method to set signing service URL
Sourcepub fn jwt_audience_validation(self, enabled: bool) -> Self
pub fn jwt_audience_validation(self, enabled: bool) -> Self
Builder method to enable/disable JWT audience validation
Sourcepub fn jwt_expiration(self, expiration_secs: u64) -> Self
pub fn jwt_expiration(self, expiration_secs: u64) -> Self
Builder method to set JWT expiration time
Sourcepub fn max_discovery_retries(self, retries: u32) -> Self
pub fn max_discovery_retries(self, retries: u32) -> Self
Builder method to set max discovery retries
Sourcepub fn discovery_backoff(self, backoff: Duration) -> Self
pub fn discovery_backoff(self, backoff: Duration) -> Self
Builder method to set discovery backoff duration
Trait Implementations§
Source§impl Clone for OnesOidcConfig
impl Clone for OnesOidcConfig
Source§fn clone(&self) -> OnesOidcConfig
fn clone(&self) -> OnesOidcConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OnesOidcConfig
impl Debug for OnesOidcConfig
Auto Trait Implementations§
impl Freeze for OnesOidcConfig
impl RefUnwindSafe for OnesOidcConfig
impl Send for OnesOidcConfig
impl Sync for OnesOidcConfig
impl Unpin for OnesOidcConfig
impl UnwindSafe for OnesOidcConfig
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more