pub struct CustomAuthData {
pub access_token: String,
pub uuid: String,
pub expires_in: i32,
pub xts_token: Option<String>,
}
Expand description
Defines the custom authentication data received from Mojang.
This struct contains the necessary information for authenticating a user with Mojang’s services, including the access token for API requests, the user’s UUID, the token’s expiry time, and an optional XTS token for Bedrock Realms.
Fields§
§access_token: String
The bearer token received from Mojang.
This token is used for making authenticated requests to Mojang’s APIs, such as launching the game or accessing user-specific data. It is crucial for the authentication process and should be securely stored and used.
uuid: String
The UUID of the authenticated user.
This UUID is not the player’s Minecraft UUID but a unique identifier generated by Mojang for authentication purposes. It is used for launching the game and should be treated as sensitive information.
expires_in: i32
The expiry time of the access token in seconds.
This field indicates how long the access token is valid. After this time, the token will expire, and a new one must be obtained to continue making authenticated requests.
xts_token: Option<String>
The XTS token for Bedrock Realms.
If the user is authenticating for Bedrock Realms, this field will contain the XTS token. This token is used specifically for accessing Bedrock Realms features and is only present if the user is authenticating for Bedrock Realms.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthInfo
impl<'de> Deserialize<'de> for AuthInfo
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>,
impl Eq for AuthInfo
impl StructuralPartialEq for AuthInfo
Auto Trait Implementations§
impl Freeze for AuthInfo
impl RefUnwindSafe for AuthInfo
impl Send for AuthInfo
impl Sync for AuthInfo
impl Unpin for AuthInfo
impl UnwindSafe for AuthInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.