Skip to content

Conversation

@TeddiO
Copy link
Owner

@TeddiO TeddiO commented Jan 2, 2026

These are general updates to improve the library, remove footguns and remove unneccesary libs.

  • Remove regex usage & regex library
  • Added STEAM_AUTH_HTTP_TIMEOUT with a default value of 15 seconds to give better control around the outbound lifecycle for requests to Steam.
  • Replaced manual query string construction with idiomatic use of url.Values and string methods, simplifying the logic and reducing potential bugs.
  • Introduced a httpDoer interface and a global httpClient variable, allowing for dependency injection and easier testing of HTTP interactions.
  • Improved error handling and validation in ValidateResponse, including stricter checks on claimed identity and SteamID extraction.
  • Added a new test file gosteamauth_test.go with a fakeHTTPClient to mock HTTP responses, providing thorough unit tests for ValidateResponse, including success, failure, network error, timeout, and identity mismatch scenarios.
  • Add GitHub Actions CI job for running said tests.

@TeddiO TeddiO merged commit b8aa3d6 into master Jan 2, 2026
10 checks passed
@TeddiO TeddiO deleted the general-improvements branch January 2, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant