pub struct SamlValidationContext<'a> { /* private fields */ }Expand description
Caller-owned validation context for typed inbound SAML messages.
Implementations§
Source§impl<'a> SamlValidationContext<'a>
impl<'a> SamlValidationContext<'a>
Sourcepub fn new(
now: SystemTime,
replay: ReplayPolicy<'a>,
) -> SamlValidationContext<'a>
pub fn new( now: SystemTime, replay: ReplayPolicy<'a>, ) -> SamlValidationContext<'a>
Build a validation context that allows five minutes of clock skew.
The same skew covers assertion conditions, bearer confirmation,
SessionNotOnOrAfter, and LogoutRequest@NotOnOrAfter.
Self::with_clock_skew replaces it.
Sourcepub fn with_clock_skew(self, clock_skew: ClockSkew) -> SamlValidationContext<'a>
pub fn with_clock_skew(self, clock_skew: ClockSkew) -> SamlValidationContext<'a>
Replace the context clock skew, including ClockSkew::strict.
Sourcepub fn with_replay_retention(
self,
retention: Duration,
) -> SamlValidationContext<'a>
pub fn with_replay_retention( self, retention: Duration, ) -> SamlValidationContext<'a>
Set explicit replay retention for protocol messages that do not carry a
SAML NotOnOrAfter value suitable for cache expiry.
Sourcepub fn now(&self) -> SystemTime
pub fn now(&self) -> SystemTime
Validation instant supplied by the caller.
Sourcepub fn clock_skew(&self) -> ClockSkew
pub fn clock_skew(&self) -> ClockSkew
Clock skew applied to time-window checks.
Sourcepub fn replay_retention(&self) -> Option<Duration>
pub fn replay_retention(&self) -> Option<Duration>
Replay retention for protocol message IDs without SAML expiry.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SamlValidationContext<'a>
impl<'a> !Send for SamlValidationContext<'a>
impl<'a> !Sync for SamlValidationContext<'a>
impl<'a> !UnwindSafe for SamlValidationContext<'a>
impl<'a> Freeze for SamlValidationContext<'a>
impl<'a> Unpin for SamlValidationContext<'a>
impl<'a> UnsafeUnpin for SamlValidationContext<'a>
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