mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-06 22:33:34 -04:00
* add sd-cloud-api * consume sd-cloud-api & leave instance writing to receiving * module-ise api crate * put back logging * remove 'join cloud library'
18 lines
413 B
Rust
18 lines
413 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct OAuthToken {
|
|
pub access_token: String,
|
|
pub refresh_token: String,
|
|
pub token_type: String,
|
|
pub expires_in: i32,
|
|
}
|
|
|
|
impl OAuthToken {
|
|
pub fn to_header(&self) -> String {
|
|
format!("{} {}", self.token_type, self.access_token)
|
|
}
|
|
}
|
|
|
|
pub const DEVICE_CODE_URN: &str = "urn:ietf:params:oauth:grant-type:device_code";
|