Read from the package's own PHP files at the commit f60e828152c0: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
SteamFactoryclass"steam": options key (a Steam Web API key: only for a player's library and ownership; the store needs none), language ("english", or "fr"), country ("US": the prices'), user_agent, store, api; for a player's identity, appid (the game's Steam app id: without it, no identity), publisher_key (the reference of the publisher Web API key: "STEAM_PUBLISHER_KEY", read through the secrets given, the environment by default), identity (the string the game passes to GetAuthTicketForWebApi; none by default), refuse_banned (false), partner_api ("https://partner.steam-api.com").
11 options · 1 method
SteamIdentityclassA player's Steam session ticket verified by Steam, on the platform: ISteamUserAuth/AuthenticateUserTicket (GET, the Steamworks Web API) with the publisher Web API key - read by its reference at each call, never returned - the game's app id, the ticket as hex, and the identity string the game passed to GetAuthTicketForWebApi when one is configured. The answer is the player's SteamID ("steam:<SteamID64>"), or a refusal that quotes Steam.
4 methods · 1 constant
SteamProviderclassSteam: the store's record of an app and its search (the storefront's own endpoints, no key: appdetails, storesearch), and - with a Web API key - a player's library (IPlayerService/GetOwnedGames) and whether they own a game. A player is a 64-bit Steam ID; a private profile reads as an empty library. With the game's app id and a publisher key, a player's session ticket verified on the platform (ISteamUserAuth/AuthenticateUserTicket, SteamIdentity), answering their SteamID.
10 methods
Omniplay\Steam
SteamFactory class
final class SteamFactory extends ProviderFactory SteamFactory.php:26
"steam": options key (a Steam Web API key: only for a player's library and ownership; the store needs none), language ("english", or "fr"), country ("US": the prices'), user_agent, store, api; for a player's identity, appid (the game's Steam app id: without it, no identity), publisher_key (the reference of the publisher Web API key: "STEAM_PUBLISHER_KEY", read through the secrets given, the environment by default), identity (the string the game passes to GetAuthTicketForWebApi; none by default), refuse_banned (false), partner_api ("https://partner.steam-api.com").
Options
| Option | Default | |
|---|---|---|
key | null | |
language | 'english' | |
country | 'US' | |
user_agent | 'omniplay/1.0 (+https://github.com/glitchr-omnisense/omniplay)' | |
store | 'https://store.steampowered.com' | |
api | 'https://api.steampowered.com' | |
appid | null | |
publisher_key | 'STEAM_PUBLISHER_KEY' | |
identity | null | |
refuse_banned | false | |
partner_api | 'https://partner.steam-api.com' |
SteamFactory::__construct()
public function __construct(readonly ?HttpClientInterface $http = null, readonly ?SecretsInterface $secrets = null)SteamIdentity class
final class SteamIdentity implements IdentityInterface SteamIdentity.php:25
A player's Steam session ticket verified by Steam, on the platform: ISteamUserAuth/AuthenticateUserTicket (GET, the Steamworks Web API) with the publisher Web API key - read by its reference at each call, never returned - the game's app id, the ticket as hex, and the identity string the game passed to GetAuthTicketForWebApi when one is configured. The answer is the player's SteamID ("steam:<SteamID64>"), or a refusal that quotes Steam.
SteamProvider answers IdentityInterface through it when the "appid" option is given. Lobbies are not here: they stay in the game, through the Steamworks SDK.
const PLATFORM = 'steam'
SteamIdentity::__construct()
public function __construct(readonly JsonClient $json, readonly SecretsInterface $secrets, readonly string $key, readonly int $appid, readonly ?string $identity = null, readonly bool $refuseBanned = false, readonly string $api = 'https://partner.steam-api.com')$keythe reference of the publisher Web API key (an environment variable's name, a vault's key)
$identitythe string the game passes to GetAuthTicketForWebApi; Steam then authenticates only the tickets made with it
$refuseBanneda player banned by VAC or by the publisher is refused, not answered
SteamIdentity::where()
public function where(): stringWhom it asks, for a person to read: Capabilities::$where.
SteamIdentity::platform()
public function platform(): stringSteamIdentity::verify()
public function verify(string $proof): IdentityThe player whose session ticket this is (the hex the game made of GetAuthTicketForWebApi's bytes). Claims: "owner" (the SteamID that owns the game, another when it is lent through Family Sharing), "vac_banned", "publisher_banned", "appid".
SteamProvider class
final class SteamProvider implements ProviderInterface, SearchInterface, CatalogueInterface, LibraryInterface, OwnershipInterface, IdentityInterface SteamProvider.php:38
Steam: the store's record of an app and its search (the storefront's own endpoints, no key: appdetails, storesearch), and - with a Web API key - a player's library (IPlayerService/GetOwnedGames) and whether they own a game. A player is a 64-bit Steam ID; a private profile reads as an empty library. With the game's app id and a publisher key, a player's session ticket verified on the platform (ISteamUserAuth/AuthenticateUserTicket, SteamIdentity), answering their SteamID.
SteamProvider::__construct()
public function __construct(readonly JsonClient $json, readonly ?string $key = null, readonly string $language = 'english', readonly string $country = 'US', readonly string $store = 'https://store.steampowered.com', readonly string $api = 'https://api.steampowered.com', readonly ?SteamIdentity $identity = null)SteamProvider::getName()
public function getName(): stringSteamProvider::getTitle()
public function getTitle(): stringSteamProvider::capabilities()
public function capabilities(): CapabilitiesSteamProvider::search()
public function search(Query $query): arraySteamProvider::game()
public function game(GameRef $ref, ?string $language = null, ?string $country = null): ?GameSteamProvider::library()
public function library(string $player): arraySteamProvider::owns()
public function owns(string $player, GameRef $game): boolSteamProvider::platform()
public function platform(): stringSteamProvider::verify()
public function verify(string $proof): IdentityThe player whose session ticket this is, verified by Steam (SteamIdentity::verify()).
- Throws
InvalidConfigException when no appid is configured: the store only