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§
Sourcefn execute(&self, request: &dyn AuthorizationRequest) -> AddonResult
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.