pub struct RequestObject {
pub response_type: ResponseType,
pub client_id: String,
pub redirect_uri: Option<String>,
pub response_mode: Option<String>,
pub response_uri: Option<String>,
pub scope: Option<String>,
pub nonce: String,
pub state: Option<String>,
pub presentation_definition: Kind<PresentationDefinition>,
pub client_id_scheme: Option<ClientIdScheme>,
pub client_metadata: Verifier,
}Expand description
Fields§
§response_type: ResponseTypeThe type of response expected from the Wallet (as Authorization Server).
If Response Type is:
- “
vp_token”: a VP Token is returned in an Authorization Response. - “
vp_token id_token” AND thescopeparameter contains “openid”: a VP Token and a Self-Issued ID Token are returned in an Authorization Response. - “
code”: a VP Token is returned in a Token Response.
The default Response Mode is “fragment”: response parameters are encoded
in the fragment added to the redirect_uri when redirecting back to the
Verifier.
client_id: StringThe Verifier ID. MUST be a valid URI.
redirect_uri: Option<String>The URI to redirect to the Verifier’s redirection endpoint as established during client registration.
response_mode: Option<String>While the response_type parameter informs the Authorization Server
(Wallet) of the desired authorization flow, the response_mode
parameter informs it of the mechanism to use when returning an
Authorization Response.
A Response Mode of “direct_post” allows the Wallet to send the
Authorization Response to an endpoint controlled by the Verifier as
an HTTPS POST request.
If not set, the default value is “fragment”.
Response parameters are returned using the “application/x-www-form-urlencoded” content type. The flow can end with an HTTPS POST request from the Wallet to the Verifier, or it can end with a redirect that follows the HTTPS POST request, if the Verifier responds with a redirect URI to the Wallet.
Response Mode “direct_post.jwt” causes the Wallet to send the
Authorization Response as an HTTPS POST request (as for
“direct_post”) except the Wallet sets a response parameter to a
JWT containing the Authorization Response. See JARM for more
detail.
response_uri: Option<String>OPTIONAL. MUST be set when the Response Mode “direct_post” is used.
The URI to which the Wallet MUST send the Authorization Response using
an HTTPS POST request as defined by the Response Mode
“direct_post”.
When response_uri is set, redirect_uri MUST NOT be set. If set when
Response Mode is “direct_post”, the Wallet MUST return an
“invalid_request” error.
Note: If the Client Identifier scheme redirect_uri is used in
conjunction with the Response Mode “direct_post”, and the
response_uri parameter is present, the client_id value MUST be
equal to the response_uri value.
scope: Option<String>The Wallet MAY allow Verifiers to request presentation of Verifiable Credentials by utilizing a pre-defined scope value. Defined in RFC6749.
nonce: StringThe nonce is used to securely bind the requested Verifiable Presentation(s) provided by the Wallet to the particular transaction. Returned in the VP’s Proof.challenge parameter.
state: Option<String>State is used to maintain state between the Authorization Request and subsequent callback from the Wallet (‘Authorization Server’).
presentation_definition: Kind<PresentationDefinition>The Presentation Definition
client_id_scheme: Option<ClientIdScheme>The client_id_scheme is used to specify how the Wallet should to
obtain and validate Verifier metadata. The following values indicate
how the Wallet should interpret the value of the client_id
parameter.
- If not set, the Wallet MUST behave as specified in RFC6749.
- If the same Client Identifier is used with different Client Identifier schemes, those occurences MUST be treated as different Verifiers. The Verifier needs to determine which Client Identifier schemes the Wallet supports prior to sending the Authorization Request in order to choose a supported scheme.
client_metadata: VerifierClient Metadata contains Verifier metadata values.
Implementations§
Source§impl RequestObject
impl RequestObject
Sourcepub fn to_qrcode(&self, endpoint: &str) -> Result<String, Error>
pub fn to_qrcode(&self, endpoint: &str) -> Result<String, Error>
Generate qrcode for Request Object.
Use the endpoint parameter to specify the Wallet’s endpoint using deep
link or direct call format.
For example,
openid-vc://?request_uri=
or GET https://holder.wallet.io/authorize?§Errors
Returns an Error::ServerError error if the Request Object cannot be
serialized.
Trait Implementations§
Source§impl Clone for RequestObject
impl Clone for RequestObject
Source§fn clone(&self) -> RequestObject
fn clone(&self) -> RequestObject
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequestObject
impl Debug for RequestObject
Source§impl Default for RequestObject
impl Default for RequestObject
Source§fn default() -> RequestObject
fn default() -> RequestObject
Source§impl<'de> Deserialize<'de> for RequestObject
impl<'de> Deserialize<'de> for RequestObject
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RequestObject, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RequestObject, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for RequestObject
impl PartialEq for RequestObject
Source§impl Serialize for RequestObject
impl Serialize for RequestObject
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for RequestObject
impl StructuralPartialEq for RequestObject
Auto Trait Implementations§
impl Freeze for RequestObject
impl RefUnwindSafe for RequestObject
impl Send for RequestObject
impl Sync for RequestObject
impl Unpin for RequestObject
impl UnwindSafe for RequestObject
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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.