xasu

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisplayClaims

type DisplayClaims struct {
	// UserInfo contains information about the authenticated user as claimed
	// by the token.
	UserInfo []UserInfo `json:"xui"`
}

DisplayClaims holds the metadata embedded in a user token.

type Token

type Token = internal.Token[DisplayClaims]

Token is an XASU (Xbox Authentication Services for Users) token that authenticates a single user account on Xbox Live. A device may have multiple user accounts signed in simultaneously (for example, multiple Microsoft Accounts on a shared Windows or Android device), and a separate user token is issued for each account to identify it individually.

User tokens are normally obtained by exchanging a Microsoft Account OAuth2 access token.

type TokenSource

type TokenSource interface {
	UserToken(ctx context.Context) (*Token, error)
}

TokenSource is the interface that supplies user tokens for authenticating individual Xbox Live user accounts.

type UserInfo

type UserInfo struct {
	// UserHash is a hash that identifies the user within an 'Authorization'
	// header. It is unique per token issuance and should not be treated as a
	// stable identifier across sessions.
	UserHash string `json:"uhs"`
}

UserInfo holds the identity information for a single Xbox Live user as claimed by a Token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL