Struct oxide_auth::frontends::simple::extensions::AddonList
source · pub struct AddonList {
pub authorization: Vec<Arc<dyn AuthorizationAddon + Send + Sync + 'static>>,
pub access_token: Vec<Arc<dyn AccessTokenAddon + Send + Sync + 'static>>,
}
Expand description
A simple list of loosly related authorization and access addons.
The owning representation of access extensions can be switched out to Box<_>
, Rc<_>
or
other types.
Fields§
Extension to be applied on authorize. This field is pub
for oxide-auth-async
be able to
implement async version of some traits.
access_token: Vec<Arc<dyn AccessTokenAddon + Send + Sync + 'static>>
Extension to be applied on get token. This field is pub
for oxide-auth-async
be able to
implement async version of some traits.
Implementations§
source§impl AddonList
impl AddonList
Add an addon that only applies to authorization.
sourcepub fn push_access_token<A>(&mut self, addon: A)where
A: AccessTokenAddon + Send + Sync + 'static,
pub fn push_access_token<A>(&mut self, addon: A)where A: AccessTokenAddon + Send + Sync + 'static,
Add an addon that only applies to access_token.
sourcepub fn push_code<A>(&mut self, addon: A)where
A: AuthorizationAddon + AccessTokenAddon + Send + Sync + 'static,
pub fn push_code<A>(&mut self, addon: A)where A: AuthorizationAddon + AccessTokenAddon + Send + Sync + 'static,
Add an addon that applies to the whole code grant flow.
The addon gets added both the authorization and access token addons.
Trait Implementations§
source§impl Extension for AddonList
impl Extension for AddonList
source§fn extend(&mut self, request: &dyn AuthRequest) -> Result<Extensions, ()>
fn extend(&mut self, request: &dyn AuthRequest) -> Result<Extensions, ()>
Inspect the request to produce extension data.
source§impl Extension for AddonList
impl Extension for AddonList
The handler for authorization code extensions.
source§fn access_token(&mut self) -> Option<&mut dyn AccessTokenExtension>
fn access_token(&mut self) -> Option<&mut dyn AccessTokenExtension>
The handler for access token extensions.
source§fn client_credentials(&mut self) -> Option<&mut dyn ClientCredentialsExtension>
fn client_credentials(&mut self) -> Option<&mut dyn ClientCredentialsExtension>
The handler for client credentials extensions.
Auto Trait Implementations§
impl !RefUnwindSafe for AddonList
impl Send for AddonList
impl Sync for AddonList
impl Unpin for AddonList
impl !UnwindSafe for AddonList
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