Skip to main content

DeviceAuthorizationGrant

Trait DeviceAuthorizationGrant 

Source
pub trait DeviceAuthorizationGrant: Send + Sync {
    // Required method
    fn authorize_request<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        request: &'life1 Map<String, Value>,
        original: &'life2 AuthRequest,
    ) -> Pin<Box<dyn Future<Output = Result<DeviceGrantAuthorization, DeviceGrantFailure>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn request_schema_fields(&self) -> Map<String, Value> { ... }
    fn on_request_validation_error(
        &self,
        issues: &[String],
    ) -> DeviceGrantFailure { ... }
    fn assert_session_redemption<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _record: &'life1 DeviceGrantRecord,
    ) -> Pin<Box<dyn Future<Output = Result<(), DeviceGrantFailure>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn verification_context<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _record: &'life1 DeviceGrantRecord,
    ) -> Pin<Box<dyn Future<Output = AuthResult<Map<String, Value>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn device_code_schema_fields(&self) -> Vec<OpenApiField> { ... }
    fn request_error_codes(&self) -> Vec<String> { ... }
    fn request_openapi_responses(&self) -> Map<String, Value> { ... }
    fn verification_openapi_properties(&self) -> Map<String, Value> { ... }
}
Expand description

Application protocol layered over the shared device-code lifecycle.

Required Methods§

Source

fn authorize_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, request: &'life1 Map<String, Value>, original: &'life2 AuthRequest, ) -> Pin<Box<dyn Future<Output = Result<DeviceGrantAuthorization, DeviceGrantFailure>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

Source

fn request_schema_fields(&self) -> Map<String, Value>

Required string request fields and their JSON schemas, including minLength.

Source

fn on_request_validation_error(&self, issues: &[String]) -> DeviceGrantFailure

Source

fn assert_session_redemption<'life0, 'life1, 'async_trait>( &'life0 self, _record: &'life1 DeviceGrantRecord, ) -> Pin<Box<dyn Future<Output = Result<(), DeviceGrantFailure>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn verification_context<'life0, 'life1, 'async_trait>( &'life0 self, _record: &'life1 DeviceGrantRecord, ) -> Pin<Box<dyn Future<Output = AuthResult<Map<String, Value>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn device_code_schema_fields(&self) -> Vec<OpenApiField>

Source

fn request_error_codes(&self) -> Vec<String>

Source

fn request_openapi_responses(&self) -> Map<String, Value>

Source

fn verification_openapi_properties(&self) -> Map<String, Value>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§