pub struct OidcConfig {
pub issuer: String,
pub client_id: String,
pub redirect_uri: String,
pub client_type: OidcClientType,
pub audience: Vec<String>,
pub allowed_algorithms: Vec<Algorithm>,
pub clock_skew: Duration,
}Expand description
OIDC validation and authorization configuration.
Fields§
§issuer: StringIssuer URL (e.g. https://accounts.google.com).
client_id: StringClient ID registered with the provider.
redirect_uri: StringExact redirect URI registered with the provider.
client_type: OidcClientTypeOIDC client type.
audience: Vec<String>Accepted audience claim values.
allowed_algorithms: Vec<Algorithm>Accepted ID-token signing algorithms.
clock_skew: DurationClock-skew tolerance for exp and nbf.
Implementations§
Source§impl OidcConfig
impl OidcConfig
Sourcepub fn new(
issuer: impl Into<String>,
client_id: impl Into<String>,
redirect_uri: impl Into<String>,
client_type: OidcClientType,
) -> Self
pub fn new( issuer: impl Into<String>, client_id: impl Into<String>, redirect_uri: impl Into<String>, client_type: OidcClientType, ) -> Self
Create a new OIDC configuration.
Sourcepub fn with_audience(self, audience: Vec<String>) -> Self
pub fn with_audience(self, audience: Vec<String>) -> Self
Override accepted audiences.
Sourcepub fn with_allowed_algorithms(self, algorithms: Vec<Algorithm>) -> Self
pub fn with_allowed_algorithms(self, algorithms: Vec<Algorithm>) -> Self
Override allowed algorithms.
Sourcepub const fn with_clock_skew(self, clock_skew: Duration) -> Self
pub const fn with_clock_skew(self, clock_skew: Duration) -> Self
Override clock-skew tolerance.
Trait Implementations§
Source§impl Clone for OidcConfig
impl Clone for OidcConfig
Source§fn clone(&self) -> OidcConfig
fn clone(&self) -> OidcConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OidcConfig
impl RefUnwindSafe for OidcConfig
impl Send for OidcConfig
impl Sync for OidcConfig
impl Unpin for OidcConfig
impl UnsafeUnpin for OidcConfig
impl UnwindSafe for OidcConfig
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
Mutably borrows from an owned value. Read more