pub struct AccessTokenResponse {
pub access_token: String,
pub scope: String,
pub expires_in: Option<u32>,
pub associated_user_scope: Option<String>,
pub associated_user: Option<AssociatedUserResponse>,
pub session: Option<String>,
pub refresh_token: Option<String>,
pub refresh_token_expires_in: Option<u32>,
}Expand description
OAuth access token response from Shopify.
This struct represents the response from Shopify’s OAuth token endpoint.
It is used with Session::from_access_token_response to create sessions.
Note: This struct is defined here temporarily and may be moved to an OAuth module in a future release.
Fields§
§access_token: StringThe access token for API calls.
scope: StringComma-separated list of granted scopes.
expires_in: Option<u32>Number of seconds until the token expires (online tokens only).
associated_user_scope: Option<String>Comma-separated list of user-specific scopes (online tokens only).
associated_user: Option<AssociatedUserResponse>Associated user information (online tokens only).
session: Option<String>Shopify-provided session ID.
refresh_token: Option<String>The refresh token for obtaining new access tokens.
Only present for expiring offline tokens.
refresh_token_expires_in: Option<u32>Number of seconds until the refresh token expires.
Only present for expiring offline tokens.
Trait Implementations§
Source§impl Clone for AccessTokenResponse
impl Clone for AccessTokenResponse
Source§fn clone(&self) -> AccessTokenResponse
fn clone(&self) -> AccessTokenResponse
Returns a duplicate 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 AccessTokenResponse
impl Debug for AccessTokenResponse
Source§impl<'de> Deserialize<'de> for AccessTokenResponse
impl<'de> Deserialize<'de> for AccessTokenResponse
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 AccessTokenResponse
impl RefUnwindSafe for AccessTokenResponse
impl Send for AccessTokenResponse
impl Sync for AccessTokenResponse
impl Unpin for AccessTokenResponse
impl UnwindSafe for AccessTokenResponse
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