Trait oxide_auth::code_grant::extensions::CodeExtension [] [src]

pub trait CodeExtension: GrantExtension {
    fn extend_code(&self, _: &CodeRequest) -> Result<Option<Extension>, ()>;
}

An extension reacting to an initial authorization code request.

Required Methods

Provides data for this request of 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.

Trait Implementations

impl<'a> GrantExtension for &'a CodeExtension
[src]

[src]

An unique identifier distinguishing this extension type for parsing and storing. Obvious choices are the registered names as administered by IANA or private identifiers. Read more

Implementors