gfclient

package
v0.0.0-...-539d71c Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GFClient

type GFClient struct {
}

func (*GFClient) Authenticate

func (c *GFClient) Authenticate(user actions.User, serverLang string) (token string, accountID string, err error)

Authenticate proceeds to authenticate the user to the Gameforge servers. An error will be returned if the connection can't be established, the server response's status code is not 201 (session created), or the response body (JSON) can't be parsed. The user needs to be authenticated in order to request a login code.

func (*GFClient) GetLoginCode

func (c *GFClient) GetLoginCode(user actions.User, token, accountID string) (string, error)

GetLoginCode returns the code (UUID) used to log in to NosTale login server. This code needs to be encoded to Base64 before it can be used in the login packet. The empty string and an error will be returned if the connection can't be established, the server response's status code is not 201 (login code generated), or the response body (JSON) can't be parsed. The user needs to be authenticated in order to request a login code. If the session has expired or the user hasn't been authenticated yet, the server will reply with a status code 503 (could not fetch session).

func (*GFClient) GetLoginCodeHex

func (c *GFClient) GetLoginCodeHex(user actions.User, token, accountID string) (string, error)

GetLoginCodeHex returns the Base64-encoded code (UUID) used to log in to NosTale login server. The empty string and an error will be returned if the connection can't be established, the server response's status code is not 201 (login code generated), or the response body (JSON) can't be parsed. The user needs to be authenticated in order to request a login code. If the session has expired or the user hasn't been authenticated yet, the server will reply with a status code 503 (could not fetch session).

Jump to

Keyboard shortcuts

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