pub struct AuthorizationCode {
pub code: String,
pub client_id: String,
pub user_id: String,
pub redirect_uri: String,
pub scope: Vec<String>,
pub created_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
}Expand description
Authorization Code | 授权码
Temporary code issued after user authorization, exchanged for access token. 用户授权后颁发的临时代码,用于交换访问令牌。
Fields§
§code: StringThe authorization code value | 授权码的值
client_id: StringClient ID that requested the code | 请求授权码的客户端 ID
user_id: StringUser ID who authorized | 授权的用户 ID
redirect_uri: StringRedirect URI used in authorization request | 授权请求中使用的回调 URI
scope: Vec<String>Granted scopes | 授予的权限范围
created_at: DateTime<Utc>Code creation timestamp | 授权码创建时间戳
expires_at: DateTime<Utc>Code expiration timestamp | 授权码过期时间戳
Trait Implementations§
Source§impl Clone for AuthorizationCode
impl Clone for AuthorizationCode
Source§fn clone(&self) -> AuthorizationCode
fn clone(&self) -> AuthorizationCode
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthorizationCode
impl Debug for AuthorizationCode
Source§impl<'de> Deserialize<'de> for AuthorizationCode
impl<'de> Deserialize<'de> for AuthorizationCode
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 Freeze for AuthorizationCode
impl RefUnwindSafe for AuthorizationCode
impl Send for AuthorizationCode
impl Sync for AuthorizationCode
impl Unpin for AuthorizationCode
impl UnwindSafe for AuthorizationCode
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)