Skip to main content

DeviceSignIn

Trait DeviceSignIn 

Source
pub trait DeviceSignIn: Send + Sync {
    // Required methods
    fn device_start(&self, client: &str, from: &str) -> Result<(String, String)>;
    fn device_info(&self, user_code: &str) -> Option<DeviceRequest>;
    fn device_approve(
        &self,
        who: &Who,
        user_code: &str,
        approve: bool,
    ) -> Result<()>;
    fn device_poll(&self, device_code: &str) -> Result<DevicePoll>;
}
Expand description

Command-line sign-in approved in the browser: the command starts it and polls, a signed-in member approves it, and the command receives a personal access token.

Required Methods§

Source

fn device_start(&self, client: &str, from: &str) -> Result<(String, String)>

A device code for the command and a short code for the member to confirm.

Source

fn device_info(&self, user_code: &str) -> Option<DeviceRequest>

Source

fn device_approve( &self, who: &Who, user_code: &str, approve: bool, ) -> Result<()>

Source

fn device_poll(&self, device_code: &str) -> Result<DevicePoll>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§