pub struct AccessTokenInfo {
pub scope: String,
pub token: String,
pub key: Option<ScopedKey>,
pub expires_at: i64,
}
Expand description
An OAuth access token, with its associated keys and metadata.
This struct represents an FxA OAuth access token, which can be used to access a resource
or service on behalf of the user. For example, accessing the user’s data in Firefox Sync
an access token for the scope https://identity.mozilla.com/apps/sync
along with the
associated encryption key.
Fields§
§scope: String
The scope of access granted by token.
token: String
The access token itself.
This is the value that should be included in the Authorization
header when
accessing an OAuth protected resource on behalf of the user.
key: Option<ScopedKey>
The client-side encryption key associated with this scope.
⚠️ Warning: the value of this field should never be revealed outside of the application. For example, it should never to sent to a server or logged in a log file.
expires_at: i64
The expiry time of the token, in seconds.
This is the timestamp at which the token is set to expire, in seconds since unix epoch. Note that it is a signed integer, for compatibility with languages that do not have an unsigned integer type.
This timestamp is for guidance only. Access tokens are not guaranteed to remain value for any particular lengthof time, and consumers should be prepared to handle auth failures even if the token has not yet expired.
Trait Implementations§
§impl<UT> ConvertError<UT> for AccessTokenInfo
impl<UT> ConvertError<UT> for AccessTokenInfo
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for AccessTokenInfo
impl Debug for AccessTokenInfo
§impl<UT> FfiConverter<UT> for AccessTokenInfo
impl<UT> FfiConverter<UT> for AccessTokenInfo
§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
§type FfiType = RustBuffer
type FfiType = RustBuffer
§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
§impl<UT> Lift<UT> for AccessTokenInfo
impl<UT> Lift<UT> for AccessTokenInfo
§impl<UT> LiftRef<UT> for AccessTokenInfo
impl<UT> LiftRef<UT> for AccessTokenInfo
type LiftType = AccessTokenInfo
§impl<UT> LiftReturn<UT> for AccessTokenInfo
impl<UT> LiftReturn<UT> for AccessTokenInfo
§type ReturnType = <AccessTokenInfo as Lift<UT>>::FfiType
type ReturnType = <AccessTokenInfo as Lift<UT>>::FfiType
§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
§impl<UT> Lower<UT> for AccessTokenInfo
impl<UT> Lower<UT> for AccessTokenInfo
§impl<UT> LowerError<UT> for AccessTokenInfo
impl<UT> LowerError<UT> for AccessTokenInfo
§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
§impl<UT> LowerReturn<UT> for AccessTokenInfo
impl<UT> LowerReturn<UT> for AccessTokenInfo
§type ReturnType = <AccessTokenInfo as Lower<UT>>::FfiType
type ReturnType = <AccessTokenInfo as Lower<UT>>::FfiType
§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
§impl<UT> TypeId<UT> for AccessTokenInfo
impl<UT> TypeId<UT> for AccessTokenInfo
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for AccessTokenInfo
impl RefUnwindSafe for AccessTokenInfo
impl Send for AccessTokenInfo
impl Sync for AccessTokenInfo
impl Unpin for AccessTokenInfo
impl UnwindSafe for AccessTokenInfo
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more