Struct sqrl_protocol::server_response::ServerResponse
source · pub struct ServerResponse {
pub protocol_version: ProtocolVersion,
pub nut: String,
pub transaction_indication_flags: Vec<TIFValue>,
pub query_url: String,
pub success_url: Option<String>,
pub cancel_url: Option<String>,
pub secret_index: Option<String>,
pub server_unlock_key: Option<String>,
pub ask: Option<String>,
}Expand description
An object representing a response from the server
Fields§
§protocol_version: ProtocolVersionThe SQRL protocol versions supported by the server (ver)
nut: StringThe nut to be used for signing the next request (nut)
transaction_indication_flags: Vec<TIFValue>A collection of transaction indication flags (tif)
query_url: StringThe server object to query in the next request (qry)
success_url: Option<String>If CPS set, the url to redirect the client’s browser to after successful authentication (url)
cancel_url: Option<String>If CPS set, a url to use to cancel a user’s authentication (can)
secret_index: Option<String>The secret index used for requesting a client to return an indexed secret (sin)
server_unlock_key: Option<String>The server unlock key requested by the client (suk)
ask: Option<String>A way for the server to request that the client display a prompt to the client user and return the selection (ask)
Implementations§
source§impl ServerResponse
impl ServerResponse
sourcepub fn new(
nut: String,
transaction_indication_flags: Vec<TIFValue>,
query_url: String
) -> ServerResponse
pub fn new( nut: String, transaction_indication_flags: Vec<TIFValue>, query_url: String ) -> ServerResponse
Create a new server response object from the nut and tif values
sourcepub fn from_base64(base64_string: &str) -> Result<Self, SqrlError>
pub fn from_base64(base64_string: &str) -> Result<Self, SqrlError>
Decode a server response from a base64-encoded value
Trait Implementations§
source§impl Debug for ServerResponse
impl Debug for ServerResponse
source§impl Display for ServerResponse
impl Display for ServerResponse
source§impl FromStr for ServerResponse
impl FromStr for ServerResponse
source§impl PartialEq for ServerResponse
impl PartialEq for ServerResponse
source§fn eq(&self, other: &ServerResponse) -> bool
fn eq(&self, other: &ServerResponse) -> bool
self and other values to be equal, and is used
by ==.