-
Notifications
You must be signed in to change notification settings - Fork 16
/
account.go
27 lines (24 loc) · 1.29 KB
/
account.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package nex
import "github.com/PretendoNetwork/nex-go/v2/types"
// Account represents a game server account.
//
// Game server accounts are separate from other accounts, like Uplay, Nintendo Accounts and NNIDs.
// These exist only on the game server. Account passwords are used as part of the servers Kerberos
// authentication. There are also a collection of non-user, special, accounts. These include a
// guest account, an account which represents the authentication server, and one which represents
// the secure server. See https://nintendo-wiki.pretendo.network/docs/nex/kerberos for more information.
type Account struct {
PID *types.PID // * The PID of the account. PIDs are unique IDs per account. NEX PIDs start at 1800000000 and decrement with each new account.
Username string // * The username for the account. For NEX user accounts this is the same as the accounts PID.
Password string // * The password for the account. For NEX accounts this is always 16 characters long using seemingly any ASCII character
}
// NewAccount returns a new instance of Account.
// This does not register an account, only creates a new
// struct instance.
func NewAccount(pid *types.PID, username, password string) *Account {
return &Account{
PID: pid,
Username: username,
Password: password,
}
}