Struct oxide_auth::frontends::simple::endpoint::ApprovedGrant
source · pub struct ApprovedGrant {
pub owner: String,
pub grant: PreGrant,
}
Expand description
Use a predetermined grant and owner as solicitor.
Convenience wrapper when the owner and her/his consent to a grant can be identified without
further inspecting the request executing the flow. This may be the case for WebRequest
implementations extracted from an original http request. This solicitor is obviously mostly
useful for one-shot endpoints.
Fields§
§owner: String
The owner that approves of the grant.
grant: PreGrant
The exact approved grant.
Trait Implementations§
source§impl<W: WebRequest> OwnerSolicitor<W> for ApprovedGrant
impl<W: WebRequest> OwnerSolicitor<W> for ApprovedGrant
source§fn check_consent(
&mut self,
_: &mut W,
solicitation: Solicitation<'_>
) -> OwnerConsent<W::Response>
fn check_consent( &mut self, _: &mut W, solicitation: Solicitation<'_> ) -> OwnerConsent<W::Response>
Approve if the grant matches exactly.
That is, client_id
, redirect_uri
, and scope
of the pre-grant are all equivalent. In
particular, the requested scope must match exactly not only be a subset of the approved
scope.
Auto Trait Implementations§
impl RefUnwindSafe for ApprovedGrant
impl Send for ApprovedGrant
impl Sync for ApprovedGrant
impl Unpin for ApprovedGrant
impl UnwindSafe for ApprovedGrant
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
Mutably borrows from an owned value. Read more