Struct scl_core::auth::microsoft::TokenResponse
source · pub struct TokenResponse {
pub token_type: String,
pub scope: String,
pub expires_in: usize,
pub access_token: Password,
pub id_token: String,
pub refresh_token: String,
pub error: String,
}
Expand description
请求设备码身份验证的响应结构
关于此结构的详情可以查阅 Microsoft 标识平台和 OAuth 2.0 设备权限授予流 - 成功的身份验证响应
Fields§
§token_type: String
总是为 Bearer
。
scope: String
如果返回访问令牌,则会列出该访问令牌的有效范围。
expires_in: usize
包含的访问令牌有效的秒数。
access_token: Password
针对请求的范围颁发。
id_token: String
如果原始 scope
参数包含 openid
范围,则颁发。
refresh_token: String
如果原始 scope
参数包含 offline_access
,则颁发。
error: String
错误信息,如果请求正常则此处是空字符串
Trait Implementations§
source§impl Clone for TokenResponse
impl Clone for TokenResponse
source§fn clone(&self) -> TokenResponse
fn clone(&self) -> TokenResponse
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 TokenResponse
impl Debug for TokenResponse
source§impl Default for TokenResponse
impl Default for TokenResponse
source§fn default() -> TokenResponse
fn default() -> TokenResponse
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TokenResponsewhere
TokenResponse: Default,
impl<'de> Deserialize<'de> for TokenResponsewhere TokenResponse: 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 TokenResponse
impl Send for TokenResponse
impl Sync for TokenResponse
impl Unpin for TokenResponse
impl UnwindSafe for TokenResponse
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