Struct oxide_auth::endpoint::Solicitation
source · pub struct Solicitation<'flow> { /* private fields */ }
Expand description
A pending solicitation to a resource owner.
This encapsulates the information available to an OwnerSolicitor
when querying consent
information.
Implementations§
source§impl<'flow> Solicitation<'flow>
impl<'flow> Solicitation<'flow>
sourcepub fn into_owned(self) -> Solicitation<'static>
pub fn into_owned(self) -> Solicitation<'static>
Clone the solicitation into an owned structure.
This mainly helps with sending it across threads.
sourcepub fn pre_grant(&self) -> &PreGrant
pub fn pre_grant(&self) -> &PreGrant
Return the pre-grant associated with the request.
The information in the PreGrant
is the authoritative information on the client and scopes
associated with the request. It has already been validated against those settings and
restrictions that were applied when registering the client.
sourcepub fn state(&self) -> Option<&str>
pub fn state(&self) -> Option<&str>
The state provided by the client request.
This will need to be provided to the response back to the client so it must be preserved across a redirect or a consent screen presented by the user agent.
sourcepub fn new(grant: &'flow PreGrant) -> Self
pub fn new(grant: &'flow PreGrant) -> Self
Create a new solicitation request from a pre grant.
You usually wouldn’t need to call this manually as it is called by the endpoint’s flow and then handed with all available information to the solicitor.
sourcepub fn with_state(self, state: &'flow str) -> Self
pub fn with_state(self, state: &'flow str) -> Self
Add a client state to the solicitation.