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§
Provided Methods§
Sourcefn request_schema_fields(&self) -> Map<String, Value>
fn request_schema_fields(&self) -> Map<String, Value>
Required string request fields and their JSON schemas, including minLength.
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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".