pub struct SignInContext {
pub purpose: String,
pub done: Vec<Factor>,
pub address: Option<String>,
pub client: Option<String>,
pub service: Option<String>,
pub time_unix: Option<i64>,
pub person: Option<Person>,
pub attributes: BTreeMap<String, Value>,
}Expand description
What a consumer knows when it asks which methods a sign-in may use, and what is still needed.
Debug shows words and counts, never the address or the person.
Fields§
§purpose: StringWhy it is asked: one of purposes.
done: Vec<Factor>The steps already passed; empty when the sign-in has not begun.
address: Option<String>The client’s IP address as the consumer determined it, text without a port; None
when it could not be determined, and never a placeholder such as 0.0.0.0.
client: Option<String>What kind of client: one of clients, or the consumer’s own word.
service: Option<String>The consumer’s own word for the service signed in to, such as portal.
time_unix: Option<i64>When it is asked, in seconds since the Unix epoch.
person: Option<Person>Who the passed steps named, once one did. None before that.
attributes: BTreeMap<String, Value>Anything else the consumer says about the sign-in; a policy reads what it knows.
Implementations§
Source§impl SignInContext
impl SignInContext
Sourcepub fn with_verified_client(self) -> Self
pub fn with_verified_client(self) -> Self
Says the client is one the consumer established itself (see
attributes::CLIENT_VERIFIED); call it only when that is so.
Sourcepub fn client_is_verified(&self) -> bool
pub fn client_is_verified(&self) -> bool
Whether the consumer said the client is verified; a missing or non-boolean attribute is not.
Trait Implementations§
Source§impl Clone for SignInContext
impl Clone for SignInContext
Source§impl Debug for SignInContext
impl Debug for SignInContext
Source§impl Default for SignInContext
impl Default for SignInContext
impl Eq for SignInContext
Source§impl FromValue for SignInContext
impl FromValue for SignInContext
Source§const KINDS: Kinds = ::guatiao::Kinds::MAP
const KINDS: Kinds = ::guatiao::Kinds::MAP
from_value may accept; any
other is refused. Every impl in this crate and every derived one
says; the default, [Kinds::ANY], claims every kind, which keeps
a type that does not say out of an enum told apart by kind.