Download the PHP package softcreatr/php-steam-guard without Composer
On this page you can find all versions of the php package softcreatr/php-steam-guard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download softcreatr/php-steam-guard
More information about softcreatr/php-steam-guard
Files in softcreatr/php-steam-guard
Package php-steam-guard
Short Description Dependency-free Steam Guard code generation for PHP
License ISC
Homepage https://1-2.dev
Informations about the package php-steam-guard
PHP Steam Guard
A small, dependency-free Steam Guard login-code generator for PHP 8.1 and newer.
CI covers PHP 8.1 through PHP 8.6; PHP 8.6 is tested against its current pre-release builds until the stable release is available.
The generator is deliberately offline. Creating a code only needs a mobile
authenticator's base64-encoded shared_secret and the current Unix time; it
does not need an HTTP client or a request to Steam.
Installation
Usage
Pass a Unix timestamp when deterministic generation is useful, for example in a test:
Steam Guard changes its five-character code every 30 seconds. Keep the host's system clock synchronized (normally with NTP). The library does not hide clock or network failures by attempting its own time synchronization.
Migrating from 0.0.1
Version 1.0 intentionally replaces the old API:
CodeGenwas replaced byCodeGenerator.generateSteamGuardCodeForTime($time)becamegenerateCode($time).TimeAlignerwas removed. Code generation no longer performs network I/O.- Guzzle and
ext-jsonare no longer runtime dependencies. - Invalid shared secrets are rejected immediately with an
InvalidArgumentException. - The supported PHP range is PHP 8.1 through PHP 8.6.
Security
A shared_secret can generate valid login codes for its Steam account. Treat
it like a password: never commit it, log it, include it in an exception, or
send it to a third-party service. On PHP 8.2 and newer, the constructor argument
is marked sensitive for backtraces. The decoded secret is also kept in a private
readonly property and hidden from ordinary debug output, but callers remain
responsible for storing the original secret securely.
License
ISC