Skip to main content

AuthStartReq

Struct AuthStartReq 

Source
pub struct AuthStartReq {
    pub source: Source,
    pub attr_types: Vec<Handle>,
    pub attr_type_choices: Vec<Vec<Handle>>,
    pub yivi_chained_session: bool,
    pub yivi_chained_session_drip: bool,
}
Expand description

Request type for AuthStartEP.

Fields§

§source: Source

Which source to use (e.g. yivi)

§attr_types: Vec<Handle>

List of requested attributes.

Can be non-empty if and only if AuthStartReq::attr_type_choices is empty. (Otherwise an ErrorCode::BadRequest is returned.)

§attr_type_choices: Vec<Vec<Handle>>

Like AuthStartReq::attr_types, but allow the user to pick each attribute type from a list. For example, if attr_type_choices is [[ph_card, email], [phone]] that means the user must disclose either a pubhubs card or an email address, and besides that also a phone attribute.

For attr::Source::Yivi this results in a ‘disjunction’ in the disclosure request.

Note that we do not offer the option to disclose either (phone + email) or ph_card, because Yivi does not allow phone and email in an inner conjunction, see https://docs.yivi.app/session-requests#multiple-credential-types-within-inner-conjunctions.

§yivi_chained_session: bool

Only when Self::source is attr::Source::Yivi can this flag be set. It makes the AuthTask::Yivi::disclosure_request instruct the yivi server to use YIVI_NEXT_SESSION_PATH as next nextSession url, see yivi documentaton, making it possible to follow-up the disclosure request with the issuance of a PubHubs card.

This means that before the dislosure result is returned to the frontend, the Yivi server will post the disclosure result to the YIVI_NEXT_SESSION_PATH endpoint to determine what session to run next.

Upon receipt of the disclosure result the YIVI_NEXT_SESSION_PATH endpoint will immediately make it available via the YiviWaitForResultEP endpoint, while keeping the Yivi server waiting for a response which must be provided via the YiviReleaseNextSessionEP endpoint.

This gives the global client time to obtain a PubHubs card issuance request from PubHubs central, to be passed to the Yivi server as next session via YiviReleaseNextSessionEP.

§yivi_chained_session_drip: bool

Whether to slowly feed the waiting yivi server spaces " ", so we can detect when a Yivi server disconnects. When yivi_chained_session_drip is enabled, we must immediately return a status code to the Yivi server, and so YiviReleaseNextSessionReq::next_session can not be None. This means that using drip we commit to having a next session (e.g. issuing a PubHubs card).

Trait Implementations§

Source§

impl Clone for AuthStartReq

Source§

fn clone(&self) -> AuthStartReq

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AuthStartReq

Source§

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

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

impl<'de> Deserialize<'de> for AuthStartReq

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AuthStartReq

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PayloadTrait for T

Source§

type JsonType = T

Source§

fn to_payload(&self) -> Payload<&T>

Used when creating requests
Source§

fn into_payload(self) -> Payload<T>

Used when forming responses
Source§

fn from_payload(payload: Payload<T>) -> Result<T, Error>

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,