Struct scl_core::auth::microsoft::DeviceCodeResponse
source · pub struct DeviceCodeResponse {
pub device_code: String,
pub user_code: String,
pub verification_uri: String,
pub expires_in: usize,
pub interval: usize,
pub message: String,
pub error: String,
}
Expand description
请求设备码的响应结构
关于此结构的详情可以查阅 Microsoft 标识平台和 OAuth 2.0 设备权限授予流 - 设备授权请求
Fields§
§device_code: String
一个长字符串,用于验证客户端与授权服务器之间的会话。 客户端使用此参数从授权服务器请求访问令牌。
user_code: String
向用户显示的短字符串,用于标识辅助设备上的会话。
verification_uri: String
用户在登录时应使用 user_code
转到的 URI。
expires_in: usize
device_code
和 user_code
过期之前的秒数。
interval: usize
在发出下一个轮询请求之前客户端应等待的秒数。
message: String
用户可读的字符串,包含面向用户的说明。
可以通过在请求中包含 ?mkt=xx-XX
格式的查询参数并填充相应的语言区域性代码,将此字符串本地化。
error: String
错误信息,如果请求正常则此处是空字符串
Trait Implementations§
source§impl Clone for DeviceCodeResponse
impl Clone for DeviceCodeResponse
source§fn clone(&self) -> DeviceCodeResponse
fn clone(&self) -> DeviceCodeResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DeviceCodeResponse
impl Debug for DeviceCodeResponse
source§impl Default for DeviceCodeResponse
impl Default for DeviceCodeResponse
source§fn default() -> DeviceCodeResponse
fn default() -> DeviceCodeResponse
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for DeviceCodeResponsewhere
DeviceCodeResponse: Default,
impl<'de> Deserialize<'de> for DeviceCodeResponsewhere DeviceCodeResponse: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for DeviceCodeResponse
impl Send for DeviceCodeResponse
impl Sync for DeviceCodeResponse
impl Unpin for DeviceCodeResponse
impl UnwindSafe for DeviceCodeResponse
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more