auth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceCodeData

type DeviceCodeData struct {
	DeviceCode      string `json:"device_code"`
	UserCode        string `json:"user_code"`
	VerificationURL string `json:"verification_uri"`
	ExpiresIn       int    `json:"expires_in"`
	Interval        int    `json:"interval"`
}

func BeginDeviceCodeAuth

func BeginDeviceCodeAuth() (*DeviceCodeData, error)

type MinecraftProfile

type MinecraftProfile struct {
	UUID     string `json:"id"`
	Username string `json:"name"`
}

func GetMinecraftProfile

func GetMinecraftProfile(accessToken string) (*MinecraftProfile, error)

type MinecraftToken

type MinecraftToken struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
}

func MinecraftAuthMSO

func MinecraftAuthMSO(xstsToken, userHash string) (*MinecraftToken, error)

type MsoTokenData

type MsoTokenData struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    int    `json:"expires_in"`
	TokenType    string `json:"token_type"`
}

func PollDeviceCodeAuth

func PollDeviceCodeAuth(data *DeviceCodeData) (*MsoTokenData, error)

func RefreshMsoToken

func RefreshMsoToken(refreshToken string) (*MsoTokenData, error)

type XSTSToken

type XSTSToken struct {
	AccessToken string `json:"Token"`
}

func XSTSAuth

func XSTSAuth(xblToken string) (*XSTSToken, error)

type XboxLiveToken

type XboxLiveToken struct {
	AccessToken string `json:"access_token"`
	UserHash    string `json:"user_hash"`
}

func XboxLiveAuth

func XboxLiveAuth(msoAccessToken string) (*XboxLiveToken, error)

Jump to

Keyboard shortcuts

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