Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthProvider ¶
type AuthProvider interface { // Name returns the name of the auth provider Name() string // Prompt asks the user to authenticate Prompt() error // LaunchAuthData returns the auth data needed to launch the game LaunchAuthData() (minecraft.LaunchAuthData, error) }
type Microsoft ¶
type Microsoft struct { *microsoft.MicrosoftClient Store *credentials.Store // contains filtered or unexported fields }
func (*Microsoft) LaunchAuthData ¶
func (m *Microsoft) LaunchAuthData() (minecraft.LaunchAuthData, error)
func (*Microsoft) SetAuthState ¶
func (m *Microsoft) SetAuthState(authData *MicrosoftCredentialStorage) error
type MicrosoftCredentialStorage ¶ added in v0.1.6
type MicrosoftCredentialStorage struct { MicrosoftAuth oauth2.Token `json:"ms"` PlayerName string `json:"pn"` UUID string `json:"id"` AccessToken string `json:"at"` ExpiresAt time.Time `json:"exp"` XUID string `json:"xuid,omitempty"` }
MicrosoftCredentialStorage is used to trim down the auth data to the minimum required otherwise the windows keyring will return an error ("The stub received bad data.")
type Mojang ¶
type Mojang struct { *mojang.MojangClient AuthData *mojang.AuthResponse Store *credentials.Store }
func (*Mojang) LaunchAuthData ¶
func (m *Mojang) LaunchAuthData() (minecraft.LaunchAuthData, error)
func (*Mojang) SetAuthState ¶
func (m *Mojang) SetAuthState(authData *mojang.AuthResponse) error
type PersistentCredentials ¶
type PersistentCredentials struct { Provider string Data json.RawMessage }
Click to show internal directories.
Click to hide internal directories.