Trait AuthorizationAddon

Source
pub trait AuthorizationAddon: GrantExtension {
    // Required method
    fn execute(&self, request: &dyn AuthorizationRequest) -> AddonResult;
}
Expand description

An extension reacting to an initial authorization code request.

Required Methods§

Source

fn execute(&self, request: &dyn AuthorizationRequest) -> AddonResult

Provides data for this request or signals faulty data.

There may be two main types of extensions:

  • Extensions storing additional information about the client
  • Validators asserting additional requirements

Derived information which needs to be bound to the returned grant can be stored in an encoded form by returning Ok(extension_data) while errors can be signaled via Err(()). Extensions can also store their pure existance by initializing the extension struct without data. Specifically, the data can be used in a corresponding AccessTokenExtension.

Implementations on Foreign Types§

Source§

impl<'a, T: AuthorizationAddon + ?Sized> AuthorizationAddon for &'a T

Source§

impl<T: AuthorizationAddon + ?Sized> AuthorizationAddon for Box<T>

Source§

impl<T: AuthorizationAddon + ?Sized> AuthorizationAddon for Rc<T>

Source§

impl<T: AuthorizationAddon + ?Sized> AuthorizationAddon for Arc<T>

Implementors§