Struct ClientRequest

Source
pub struct ClientRequest {
    pub client_params: ClientParameters,
    pub server_data: ServerData,
    pub identity_signature: Signature,
    pub previous_identity_signature: Option<Signature>,
    pub unlock_request_signature: Option<String>,
}
Expand description

A client request to a server

Fields§

§client_params: ClientParameters

The client parameters

§server_data: ServerData

The previous server response, or the sqrl url if the first request

§identity_signature: Signature

The signature of this request (ids)

§previous_identity_signature: Option<Signature>

The signature of this request using a previous identity (pids)

§unlock_request_signature: Option<String>

The unlock request signature for an identity unlock (urs)

Implementations§

Source§

impl ClientRequest

Source

pub fn new( client_params: ClientParameters, server_data: ServerData, identity_signature: Signature, ) -> Self

Generate a new client request

Source

pub fn from_query_string(query_string: &str) -> Result<Self>

Parse a client request from a query string

Source

pub fn to_query_string(&self) -> String

Convert a client request to the query string to add in the request

Source

pub fn get_signed_string(&self) -> String

Get the portion of the client request that is signed

Source

pub fn validate(&self) -> Result<()>

Validate that the values input in the client request are valid

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,