{"id":28147743,"url":"https://github.com/dusta/jwt-ready","last_synced_at":"2026-04-29T10:32:18.263Z","repository":{"id":56973348,"uuid":"168834663","full_name":"dusta/jwt-ready","owner":"dusta","description":"Simple Firebase\\JWT wrapper","archived":false,"fork":false,"pushed_at":"2019-02-02T17:37:55.000Z","size":16,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-03T23:09:12.735Z","etag":null,"topics":["auth","authentication","dframe","firebase","jwt","slim","standalone","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dusta.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":"2019-02-02T13:29:51.000Z","updated_at":"2022-01-31T04:47:06.000Z","dependencies_parsed_at":"2022-08-21T10:20:55.880Z","dependency_job_id":null,"html_url":"https://github.com/dusta/jwt-ready","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dusta/jwt-ready","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusta%2Fjwt-ready","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusta%2Fjwt-ready/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusta%2Fjwt-ready/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusta%2Fjwt-ready/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dusta","download_url":"https://codeload.github.com/dusta/jwt-ready/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusta%2Fjwt-ready/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32421581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"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":["auth","authentication","dframe","firebase","jwt","slim","standalone","wrapper"],"created_at":"2025-05-15T00:22:11.654Z","updated_at":"2026-04-29T10:32:18.246Z","avatar_url":"https://github.com/dusta.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWTReady\nSimple Firebase\\JWT wrapper\n\n\n# PHP Standalone\n\n```php\nuse Dusta\\JWTReady\\JWTReady;\n\nrequire_once __DIR__ . '/../vendor/autoload.php'; \n$JWTReady = new JWTReady(['key' =\u003e 'YOUR-SECRET-KEY']);\n\n// Return string\n$jwt = $JWTReady-\u003egenerate(['key' =\u003e 'value']);\n// return eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJrZXkiOm51bGwsImlhdCI6bnVsbC.....\n\n// if empty check headers Bearer/s\n$check = $JWTReady-\u003echeckJWT($jwt);\n// return ['jwt' =\u003e 'eyJ0eXAiOiJKV1QiLCJhbG....', 'payload' =\u003e [...]]\n\n$decoded = $JWTReady-\u003edecode($jwt);\n// return ['key' =\u003e 'value']\n```\n\n# Example SilmFramework\n\n**src/routers.php**\n```php\nuse Slim\\Http\\Request;\nuse Slim\\Http\\Response;\n\n$app-\u003eget('/auth/check', function (Request $request, Response $response, array $args) {\n\n    try {\n\n        /** @var JWTReady $JWTReady */\n        $JWTReady = $this-\u003eget('JWTReady');\n        $checkJWT = $JWTReady-\u003echeckJWT();\n\n    } catch (AuthorizationHeaderException $e) {\n        return $response-\u003ewithJson(['code' =\u003e 401, 'message' =\u003e 'Invalid BearerToken']);\n    }\n\n    return $response-\u003ewithJson(['code' =\u003e 200])-\u003ewithHeader('Bearer', $checkJWT-\u003eget('jwt'));\n});\n\n```\n\n**src/dependencies.php**\n``` php\nuse Dusta\\JWTReady\\JWTReady;\n\n$container = $app-\u003egetContainer();\n\n// monolog\n$container['JWTReady'] = function ($c) {\n    $settings = $c-\u003eget('settings')['JWTReady'];\n\n    $JWTReady = new JWTReady($settings);\n    return $JWTReady;\n};\n```\n\n**src/settings.php**\n```php\n\u003c?php\nreturn [\n    'settings' =\u003e [\n        'displayErrorDetails' =\u003e true, // set to false in production\n        'addContentLengthHeader' =\u003e false, // Allow the web server to send the content-length header\n\n        'JWTReady' =\u003e [\n            'key' =\u003e 'SecretKey',\n            'iat' =\u003e null,\n            'jti' =\u003e null,\n            'iss' =\u003e null,\n            'nbf' =\u003e null,\n            'exp' =\u003e null,\n            'data' =\u003e null\n        ]\n    ],\n];\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdusta%2Fjwt-ready","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdusta%2Fjwt-ready","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdusta%2Fjwt-ready/lists"}