pub struct AuthorizationCode {
pub code: String,
pub client_id: String,
pub user_id: i64,
pub redirect_uri: String,
pub scope: String,
pub created_at: i64,
pub expires_at: i64,
pub used: bool,
}Expand description
OAuth2 授权码
Fields§
§code: String授权码值
client_id: String关联的客户端 ID
user_id: i64关联的用户 ID
redirect_uri: String重定向 URI(必须与授权请求一致)
scope: String请求的权限范围
created_at: i64创建时间(Unix 秒)
expires_at: i64过期时间(Unix 秒),默认 600 秒(10 分钟)
used: bool是否已使用(一次性消费)
Implementations§
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthorizationCode
impl RefUnwindSafe for AuthorizationCode
impl Send for AuthorizationCode
impl Sync for AuthorizationCode
impl Unpin for AuthorizationCode
impl UnsafeUnpin for AuthorizationCode
impl UnwindSafe for AuthorizationCode
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