auth

package
v0.0.0-...-30d8e43 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UrlEncodedToMap

func UrlEncodedToMap(url string) map[string]string

Types

type Authentication

type Authentication struct {
	HtClient *HttpClient

	MsAccessToken  string
	MsRefreshToken *string
}

func NewAuthentication

func NewAuthentication(accessLink string) (*Authentication, error)

type HttpClient

type HttpClient struct {
	LastRedirect string
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient() *HttpClient

func (*HttpClient) GET

func (h *HttpClient) GET(url string, keys, vals []string) ([]byte, error)

func (*HttpClient) POST

func (h *HttpClient) POST(url, body string, keys, vals []string) ([]byte, error)

type Jar

type Jar struct {
	// contains filtered or unexported fields
}

func (*Jar) Cookies

func (j *Jar) Cookies(u *url.URL) []*http.Cookie

func (*Jar) SetCookies

func (j *Jar) SetCookies(u *url.URL, cookies []*http.Cookie)

type MinecraftAuthentication

type MinecraftAuthentication struct {
	AccessToken    string
	XboxLive       string
	Userhash       string
	XstsToken      string
	MinecraftToken string

	Client *HttpClient
}

func NewMinecraftAuthentication

func NewMinecraftAuthentication(accessToken string, client *HttpClient) (*MinecraftAuthentication, error)

func (*MinecraftAuthentication) AuthXSTS

func (m *MinecraftAuthentication) AuthXSTS() error

func (*MinecraftAuthentication) AuthXboxLive

func (m *MinecraftAuthentication) AuthXboxLive() error

func (*MinecraftAuthentication) AuthenticateMinecraft

func (m *MinecraftAuthentication) AuthenticateMinecraft() error

func (*MinecraftAuthentication) GetProfile

func (ac *MinecraftAuthentication) GetProfile() (*MinecraftProfile, error)

func (*MinecraftAuthentication) OwnsGame

func (acc *MinecraftAuthentication) OwnsGame() bool

type MinecraftProfile

type MinecraftProfile struct {
	Id    string
	Name  string
	Skins []struct {
		Id      string
		State   string
		Url     string
		Variant string
		Alias   string
	}
	Capes []interface{}
}

type Ownership

type Ownership struct {
	Items []struct {
		Name      string
		Signature string
	}
	Signature string
	KeyId     string
}

Jump to

Keyboard shortcuts

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