pub struct AuthResult {
pub access_token: String,
pub user_id: String,
pub is_new_user: bool,
pub has_share: bool,
pub profile: Option<AuthProfile>,
}Expand description
The result of a successful server-side sign-in.
Fields§
§access_token: StringThe Decane access token (ES256 JWT, 8-hour expiry). Pass it to
verify_access_token, get_user, get_addresses, or hand it to the
end user’s client. The backend calls this field jwt.
user_id: StringStable Decane user id (the same value verify_access_token returns as
user_id).
is_new_user: boolTrue when this sign-in was the user’s first.
False when the user has no wallet yet. The client SDK creates one on
this sign-in, unless your server already did (create_user).
profile: Option<AuthProfile>Present for Google and KingsChat sign-ins; absent for email and custom auth.
Trait Implementations§
Source§impl Clone for AuthResult
impl Clone for AuthResult
Source§impl Debug for AuthResult
impl Debug for AuthResult
Source§impl<'de> Deserialize<'de> for AuthResult
impl<'de> Deserialize<'de> for AuthResult
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
impl Eq for AuthResult
Source§impl PartialEq for AuthResult
impl PartialEq for AuthResult
Source§impl Serialize for AuthResult
impl Serialize for AuthResult
impl StructuralPartialEq for AuthResult
Auto Trait Implementations§
impl Freeze for AuthResult
impl RefUnwindSafe for AuthResult
impl Send for AuthResult
impl Sync for AuthResult
impl Unpin for AuthResult
impl UnsafeUnpin for AuthResult
impl UnwindSafe for AuthResult
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