auth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultHttpClient

func NewDefaultHttpClient() *fasthttp.Client

Types

type Authenticator

type Authenticator struct {
	ServerKey  *rsa.PrivateKey
	PublicKey  []byte // ASN.1 DER form encoded
	HttpClient *fasthttp.Client
}

Authenticator is a Minecraft client login authenticator.

func NewAuthenticator

func NewAuthenticator() *Authenticator

func (*Authenticator) GenerateServerId

func (a *Authenticator) GenerateServerId(sharedSecret []byte) string

func (*Authenticator) HasJoined

func (a *Authenticator) HasJoined(username, optionalUserIp string, serverId string) (statusCode int, body []byte, err error)

Jump to

Keyboard shortcuts

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