Documentation
¶
Overview ¶
The rbxauth package is a wrapper for the Roblox authentication API (v2).
Index ¶
- Constants
- type Config
- func (cfg *Config) Login(username string, password []byte) ([]*http.Cookie, *Step, error)
- func (cfg *Config) LoginCred(credType, value string, password []byte) ([]*http.Cookie, *Step, error)
- func (cfg *Config) LoginID(userID int64, password []byte) ([]*http.Cookie, *Step, error)
- func (cfg *Config) Logout(cookies []*http.Cookie) error
- type Error
- type Errors
- type StatusError
- type Step
Constants ¶
const DefaultHost = "roblox.com"
DefaultHost defines the default host to use when none is specified.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Host is the domain on which to authenticate. Interpreted as DefaultHost // if empty. Host string }
Config configures an authentication action.
func (*Config) LoginCred ¶
func (cfg *Config) LoginCred(credType, value string, password []byte) ([]*http.Cookie, *Step, error)
LoginCred attempts to authenticate a user by using the provided credentials.
The credType argument specifies a kind of identifier, which is associated with the account to be authenticated. The value argument is the identifier itself. The following types are known:
"Username" : The username associated with the account. "Email" : The email associated with the account. "PhoneNumber" : The phone number associated with the account.
The password argument is specified as a slice for future compatibility, where the password may be handled within secured memory.
If multi-step authentication is required, then a Step object is returned. Otherwise, HTTP cookies representing the session are returned.
type StatusError ¶
type StatusError int
StatusError represents an error derived from the status code of an HTTP response.
func (StatusError) Error ¶
func (err StatusError) Error() string
Error implements the error interface.
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
Step holds the state of a multi-step verification action.