{"id":23134902,"url":"https://github.com/4players/odin-tokens-php","last_synced_at":"2026-05-03T06:31:59.521Z","repository":{"id":57710283,"uuid":"501662339","full_name":"4Players/odin-tokens-php","owner":"4Players","description":"Lightweight package to generate access keys and room tokens used by 4Players ODIN","archived":false,"fork":false,"pushed_at":"2023-06-07T11:01:21.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T19:28:37.395Z","etag":null,"topics":["authentication","ed25519","jwt","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4Players.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-09T13:22:37.000Z","updated_at":"2022-06-09T13:42:40.000Z","dependencies_parsed_at":"2023-01-24T01:16:03.340Z","dependency_job_id":null,"html_url":"https://github.com/4Players/odin-tokens-php","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4Players%2Fodin-tokens-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4Players%2Fodin-tokens-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4Players%2Fodin-tokens-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4Players%2Fodin-tokens-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4Players","download_url":"https://codeload.github.com/4Players/odin-tokens-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142775,"owners_count":20890788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","ed25519","jwt","php"],"created_at":"2024-12-17T12:13:37.973Z","updated_at":"2026-05-03T06:31:59.517Z","avatar_url":"https://github.com/4Players.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 4players/odin-tokens\n\nThis is a lightweight package to generate API keys and tokens used for ODIN Voice by 4Players.\n\n[ODIN Voice](https://odin.4players.io/voice-chat/) by [4Players GmbH](https://www.4players.io/company/about_us/) is a cross-platform software development kit (SDK)\nthat enables developers to integrate voice and video chat technology into multiplayer games, apps and websites.\nCheck out our [full online documentation](https://docs.4players.io/voice/)!\n\n\n## Flowchart\n\n```mermaid\ngraph TB\n  RandomBytes[Random Bytes] --\u003e AccessKey;\n  AccessKey --\u003e PublicKey;\n  AccessKey --\u003e SecretKey;\n  PublicKey --\u003e KeyId;\n```\n\n## Example\n\n```php\nuse FourPlayers\\Odin\\TokenGenerator;\n\n$accessKey = \"\u003cYOUR ACCESS KEY HERE\u003e\";\n$generator = new TokenGenerator($accessKey);\n$token = $generator-\u003ecreateToken(\"my room\", \"john doe\");\n\necho \"generated a new token: $token\\n\"\n```\n\n## Terminology\n\n| Term      | Description                                                                                                                                         |\n| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| AccessKey | Gives access to the ODIN network for a customer. It is a 44 character long Base64-String, which consists of a version, random bytes and a checksum. |\n| SecretKey | Generated from the AccessKey, it is based on the Ed25519-Curve and used to sign a Token generated by the customer.                                  |\n| PublicKey | Generated from the AccessKey, it is based on the Ed25519-Curve and must be uploaded to 4Players so that a generated Token can be verified.          |\n| KeyId     | A shortened PublicKey, included in Token, making it possible to identify what PublicKey must be used to verify the Token.                           |\n| Token     | A [JWT] given to the game clients that allows them to connect to a voice/video chat room in the ODIN network.                                       |\n\n[jwt]: https://en.wikipedia.org/wiki/JSON_Web_Token\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4players%2Fodin-tokens-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4players%2Fodin-tokens-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4players%2Fodin-tokens-php/lists"}