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: SourceWhich 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: boolOnly 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: boolWhether 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
impl Clone for AuthStartReq
Source§fn clone(&self) -> AuthStartReq
fn clone(&self) -> AuthStartReq
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthStartReq
impl Debug for AuthStartReq
Source§impl<'de> Deserialize<'de> for AuthStartReq
impl<'de> Deserialize<'de> for AuthStartReq
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for AuthStartReq
impl RefUnwindSafe for AuthStartReq
impl Send for AuthStartReq
impl Sync for AuthStartReq
impl Unpin for AuthStartReq
impl UnsafeUnpin for AuthStartReq
impl UnwindSafe for AuthStartReq
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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