gosteamauth

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: GPL-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTTPTimeout = 15 * time.Second

Functions

func BuildQueryString

func BuildQueryString(responsePath string) string

BuildQueryString uses a url.Values map to correctly structure the paramters to send to Steam Strictly speaking we only care that the Scheme is either http or https. Any other validation should really be done before using this function.

func RedirectClient

func RedirectClient(w http.ResponseWriter, r *http.Request, queryString string)

RedirectClient is a helper function that does the redirection to Steam with the correct properties on our behalf.

func ValidateResponse

func ValidateResponse(results map[string]string) (steamID64 string, isValid bool, err error)

ValidateResponse is the real chunk of work that goes on. When the client comes back to our site we need to take what they give us in the query string and hit up Steam directly to verify what we're being provided with is valid. If we end up with "is_valid:true" response from the Steam then isValid will always return true. In any other situation (credential failure, error etc) isValid will always return false and we aim to provide a descriptive error where possible.

func ValuesToMap

func ValuesToMap(fakeMap url.Values) map[string]string

ValuesToMap is a boilerplate function designed to convert the results of a url.Values in to a readable map[string]string for ValidateResponse.

Types

This section is empty.

Jump to

Keyboard shortcuts

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