Struct ClientParameters

Source
pub struct ClientParameters {
    pub protocol_version: ProtocolVersion,
    pub command: ClientCommand,
    pub identity_key: VerifyingKey,
    pub options: Option<Vec<ClientOption>>,
    pub button: Option<u8>,
    pub previous_identity_key: Option<VerifyingKey>,
    pub index_secret: Option<String>,
    pub previous_index_secret: Option<String>,
    pub server_unlock_key: Option<String>,
    pub verify_unlock_key: Option<String>,
}
Expand description

Parameters used for sending requests to the client

Fields§

§protocol_version: ProtocolVersion

The supported protocol versions of the client (ver)

§command: ClientCommand

The client command requested to be performed (cmd)

§identity_key: VerifyingKey

The client identity used to sign the request (idk)

§options: Option<Vec<ClientOption>>

Optional options requested by the client (opt)

§button: Option<u8>

The button pressed in response to a server query (btn)

§previous_identity_key: Option<VerifyingKey>

A previous client identity used to sign the request (pidk)

§index_secret: Option<String>

The current identity indexed secret in response to a server query (ins)

§previous_index_secret: Option<String>

The previous identity indexed secret in response to a server query (pins)

§server_unlock_key: Option<String>

The server unlock key used for unlocking an identity (suk)

§verify_unlock_key: Option<String>

The verify unlock key used for unlocking an identity (vuk)

Implementations§

Source§

impl ClientParameters

Source

pub fn new( command: ClientCommand, identity_key: VerifyingKey, ) -> ClientParameters

Create a new client parameter using the command and verifying key

Source

pub fn from_base64(base64_string: &str) -> Result<Self>

Parse a base64-encoded client parameter value

Source

pub fn to_base64(&self) -> String

base64-encode this client parameter object

Source

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

Verify the client request is valid

Trait Implementations§

Source§

impl Debug for ClientParameters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ClientParameters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for ClientParameters

Source§

type Err = SqrlError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for ClientParameters

Source§

fn eq(&self, other: &ClientParameters) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ClientParameters

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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,