pub struct Challenge {
pub session_id: String,
pub nonce: String,
pub verifier_key: String,
pub issued_at: DateTime<Utc>,
}Expand description
What the enforcer sends first.
Fields§
§session_id: StringSession id the enforcer was asked to open.
nonce: StringFresh random nonce, base64.
verifier_key: StringThe enforcer’s ephemeral public key for this session, base64.
issued_at: DateTime<Utc>When the enforcer issued it.
Implementations§
Source§impl Challenge
impl Challenge
Sourcepub fn new(session_id: &str, keys: &SessionKeys) -> Result<Self>
pub fn new(session_id: &str, keys: &SessionKeys) -> Result<Self>
A new challenge for session_id with keys.
Sourcepub fn expectation(&self) -> SessionChallenge
pub fn expectation(&self) -> SessionChallenge
What SessionBody::check compares the statement to.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Challenge
impl<'de> Deserialize<'de> for Challenge
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Challenge
impl StructuralPartialEq for Challenge
Auto Trait Implementations§
impl Forget for Challenge
impl Freeze for Challenge
impl Move for Challenge
impl RefUnwindSafe for Challenge
impl Send for Challenge
impl Sync for Challenge
impl Unpin for Challenge
impl UnsafeUnpin for Challenge
impl UnwindSafe for Challenge
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