{"id":34938979,"url":"https://github.com/phpnomad/firebase-jwt-integration","last_synced_at":"2026-05-20T20:11:11.029Z","repository":{"id":262079932,"uuid":"886164222","full_name":"phpnomad/firebase-jwt-integration","owner":"phpnomad","description":"Integrates Firebase JWT with PHPNomad's JWTStrategy","archived":false,"fork":false,"pushed_at":"2025-04-17T20:07:34.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-28T07:55:09.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpnomad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-10T11:27:07.000Z","updated_at":"2025-04-17T20:07:03.000Z","dependencies_parsed_at":"2025-04-17T21:29:45.111Z","dependency_job_id":"c7be41ba-c9ae-488d-953e-c018ddfb06b1","html_url":"https://github.com/phpnomad/firebase-jwt-integration","commit_stats":null,"previous_names":["phpnomad/firebase-jwt-integration"],"tags_count":1,"template":false,"template_full_name":"phpnomad/repository-template","purl":"pkg:github/phpnomad/firebase-jwt-integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Ffirebase-jwt-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Ffirebase-jwt-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Ffirebase-jwt-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Ffirebase-jwt-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpnomad","download_url":"https://codeload.github.com/phpnomad/firebase-jwt-integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Ffirebase-jwt-integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33273749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T15:12:43.734Z","status":"ssl_error","status_checked_at":"2026-05-20T15:12:42.300Z","response_time":356,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-12-26T18:49:27.451Z","updated_at":"2026-05-20T20:11:11.024Z","avatar_url":"https://github.com/phpnomad.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phpnomad/firebase-jwt-integration\n\n[![Latest Version](https://img.shields.io/packagist/v/phpnomad/firebase-jwt-integration.svg)](https://packagist.org/packages/phpnomad/firebase-jwt-integration)\n[![Total Downloads](https://img.shields.io/packagist/dt/phpnomad/firebase-jwt-integration.svg)](https://packagist.org/packages/phpnomad/firebase-jwt-integration)\n[![PHP Version](https://img.shields.io/packagist/php-v/phpnomad/firebase-jwt-integration.svg)](https://packagist.org/packages/phpnomad/firebase-jwt-integration)\n[![License](https://img.shields.io/packagist/l/phpnomad/firebase-jwt-integration.svg)](https://packagist.org/packages/phpnomad/firebase-jwt-integration)\n\nIntegrates the [firebase/php-jwt](https://github.com/firebase/php-jwt) library with `phpnomad/auth`'s `JwtStrategy` interface. It provides a single concrete strategy that encodes payloads into HS256-signed JSON Web Tokens and decodes them back into arrays, translating firebase/php-jwt's exception types into `PHPNomad\\Auth\\Exceptions\\JwtException` so the rest of your application only has to catch one thing.\n\n## Installation\n\n```bash\ncomposer require phpnomad/firebase-jwt-integration\n```\n\n## What This Provides\n\n- A `FirebaseJwt` strategy class that implements `PHPNomad\\Auth\\Interfaces\\JwtStrategy` using `firebase/php-jwt`, with HS256 for both encoding and verification.\n- Exception translation that maps `ExpiredException`, `SignatureInvalidException`, `BeforeValidException`, and the standard PHP value errors into `PHPNomad\\Auth\\Exceptions\\JwtException` with descriptive messages.\n\n## Requirements\n\n- `phpnomad/auth ^1.0` for the `JwtStrategy` interface and its `JwtException` type.\n- `firebase/php-jwt ^6.10` as the underlying JWT library.\n\n## Usage\n\nBind `FirebaseJwt` to the `JwtStrategy` interface inside one of your bootstrapper initializers. Any service that depends on `JwtStrategy` will then receive this implementation without knowing which library is wired in behind it.\n\n```php\n\u003c?php\n\nnamespace MyApp\\Strategies;\n\nuse PHPNomad\\Auth\\Interfaces\\JwtStrategy;\nuse PHPNomad\\JWT\\Firebase\\Integration\\Strategies\\FirebaseJwt;\nuse PHPNomad\\Loader\\Interfaces\\HasClassDefinitions;\n\nfinal class JwtInitializer implements HasClassDefinitions\n{\n    public function getClassDefinitions(): array\n    {\n        return [\n            FirebaseJwt::class =\u003e JwtStrategy::class,\n        ];\n    }\n}\n```\n\nWith that binding in place, a service can take `JwtStrategy` as a constructor dependency and call `$jwt-\u003eencode($payload, $secret)` or `$jwt-\u003edecode($token, $secret)` without ever referencing `FirebaseJwt` directly.\n\n## Documentation\n\nSee the bootstrapping and strategy binding guides at [phpnomad.com](https://phpnomad.com). For details on the underlying library, configuration options, and supported algorithms, see [firebase/php-jwt](https://github.com/firebase/php-jwt).\n\n## License\n\nReleased under the MIT License. See [LICENSE.txt](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpnomad%2Ffirebase-jwt-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpnomad%2Ffirebase-jwt-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpnomad%2Ffirebase-jwt-integration/lists"}