{"id":37001272,"url":"https://github.com/bayareawebpro/laravel-simple-jwt","last_synced_at":"2026-01-14T00:09:29.251Z","repository":{"id":56950534,"uuid":"278821204","full_name":"bayareawebpro/laravel-simple-jwt","owner":"bayareawebpro","description":"A simple JWT implementation for Laravel","archived":true,"fork":false,"pushed_at":"2021-01-23T01:16:18.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T14:40:40.613Z","etag":null,"topics":["auth","jwt","laravel","simple"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/bayareawebpro/laravel-simple-jwt","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/bayareawebpro.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":"2020-07-11T08:32:19.000Z","updated_at":"2023-01-28T00:48:57.000Z","dependencies_parsed_at":"2022-08-21T03:40:18.655Z","dependency_job_id":null,"html_url":"https://github.com/bayareawebpro/laravel-simple-jwt","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":"bayareawebpro/laravel-package-boilerplate","purl":"pkg:github/bayareawebpro/laravel-simple-jwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayareawebpro%2Flaravel-simple-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayareawebpro%2Flaravel-simple-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayareawebpro%2Flaravel-simple-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayareawebpro%2Flaravel-simple-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bayareawebpro","download_url":"https://codeload.github.com/bayareawebpro/laravel-simple-jwt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayareawebpro%2Flaravel-simple-jwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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","jwt","laravel","simple"],"created_at":"2026-01-14T00:09:28.435Z","updated_at":"2026-01-14T00:09:29.239Z","avatar_url":"https://github.com/bayareawebpro.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Simple JWT Authentication\n\n![CI](https://github.com/bayareawebpro/laravel-simple-jwt/workflows/ci/badge.svg)\n![Coverage](https://codecov.io/gh/bayareawebpro/laravel-simple-jwt/branch/master/graph/badge.svg)\n![Downloads](https://img.shields.io/packagist/dt/bayareawebpro/laravel-simple-jwt.svg)\n![Version](https://img.shields.io/github/v/release/bayareawebpro/laravel-simple-jwt.svg)\n![License](https://img.shields.io/badge/License-MIT-success.svg)\n\n```bash\ncomposer require bayareawebpro/laravel-simple-jwt\n```\n\n### Create Encryption Secret\n```shell script\nartisan jwt:secret\n```\n\n### Add Secret to Environment File\n```php\nJWT_SECRET=XXX\n```\n\n### Configure Auth.php\n```\n'guards' =\u003e [\n    ...\n    'api' =\u003e [\n        'driver' =\u003e 'simple-jwt', \n        'provider' =\u003e 'users',\n        'hash' =\u003e false,\n    ],\n],\n```\n\n### Register in Auth Service Provider.\n\n```php\nJsonWebToken::register(User::class, 'token');\n```\n\n### Create New Token, Expiration, and Claims\n```php\n$token = JsonWebToken::createForUser(User::first(), now()-\u003eaddHours(3), [\n  'my_key' =\u003e true\n]);\n```\n\n\n### Authenticate\n\nQuery String\n```text\nhttp://laravel.test/api/user?token=xxx\n```\n\nOr Header\n```text\nAuthorization: Bearer XXX\n```\n\n### Get Claims From Token\n```php\n$request-\u003ejwt()-\u003eget('my_key');\n$request-\u003ejwt('my_key');\n```\n\n### Extend Token Lifetime \u0026 Claims\n```php\n$newToken = JsonWebToken::extendToken(request()-\u003ejwt(), now()-\u003eaddHours(3), ['key' =\u003e true]);\n```\n\n### Blacklist Handler\n\n```php\n$bannedUUID = request()-\u003ejwt('jti');\n```\n```php\nJsonWebToken::rejectionHandler(fn($parsed)=\u003ein_array($parsed-\u003eget('jti'),[\n    $bannedUUID\n]));\n```\n\n### Testing\n``` bash\ncomposer test\ncomposer lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayareawebpro%2Flaravel-simple-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbayareawebpro%2Flaravel-simple-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayareawebpro%2Flaravel-simple-jwt/lists"}