{"id":20454933,"url":"https://github.com/little-apps/littlejwt","last_synced_at":"2025-04-13T03:35:32.076Z","repository":{"id":41875509,"uuid":"451251601","full_name":"little-apps/LittleJWT","owner":"little-apps","description":"Secure Your Laravel Web App with Little JWT - The Key to Effortless Token Management!","archived":false,"fork":false,"pushed_at":"2025-03-03T04:03:43.000Z","size":712,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T04:48:19.625Z","etag":null,"topics":["jsonwebtoken","jwt","laravel","php"],"latest_commit_sha":null,"homepage":"https://www.getlittlejwt.com/","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/little-apps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"little-apps"}},"created_at":"2022-01-23T22:53:54.000Z","updated_at":"2025-03-03T03:59:59.000Z","dependencies_parsed_at":"2024-04-29T00:23:47.380Z","dependency_job_id":"a37cb436-9e5b-4e04-8d0a-d95022230d9a","html_url":"https://github.com/little-apps/LittleJWT","commit_stats":{"total_commits":366,"total_committers":4,"mean_commits":91.5,"dds":"0.24590163934426235","last_synced_commit":"8376569b7550014bf068a5ccf015b9486d26d3eb"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-apps%2FLittleJWT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-apps%2FLittleJWT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-apps%2FLittleJWT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-apps%2FLittleJWT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/little-apps","download_url":"https://codeload.github.com/little-apps/LittleJWT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248660014,"owners_count":21141224,"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":["jsonwebtoken","jwt","laravel","php"],"created_at":"2024-11-15T11:17:24.511Z","updated_at":"2025-04-13T03:35:32.070Z","avatar_url":"https://github.com/little-apps.png","language":"PHP","funding_links":["https://github.com/sponsors/little-apps"],"categories":[],"sub_categories":[],"readme":"![Little JWT](https://i.imgur.com/N3D0oUY.png?1)\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/little-apps/littlejwt)](https://packagist.org/packages/little-apps/littlejwt)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/little-apps/littlejwt/run-tests.yml?branch=main)](https://github.com/little-apps/littlejwt/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![Format (PHP)](https://github.com/little-apps/LittleJWT/actions/workflows/laravel-pint.yml/badge.svg)](https://github.com/little-apps/LittleJWT/actions/workflows/laravel-pint.yml)\n[![Coverage Status](https://coveralls.io/repos/github/little-apps/LittleJWT/badge.svg?branch=main)](https://coveralls.io/github/little-apps/LittleJWT?branch=main)\n[![Total Downloads](https://img.shields.io/packagist/dt/little-apps/littlejwt.svg?style=flat-square)](https://packagist.org/packages/little-apps/littlejwt)\n\nSecure Your Laravel Web App with Little JWT - The Key to Effortless Token Management!\n\n## Show Your Support\n\nLittle Apps relies on people like you to keep our software running. If you would like to show your support for Little Registry Cleaner, then you can [make a donation](https://www.little-apps.com/?donate) using PayPal, Payza or credit card (via Stripe). Please note that any amount helps (even just $1).\n\n## Requirements\n\n * PHP v8.1 or higher\n * Laravel 10.x, 11.x, or 12.x\n\n## Installation\n\nInstall the package via composer:\n\n```bash\ncomposer require little-apps/littlejwt\n```\n\nPublish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"littlejwt-config\"\n```\n\nGenerate a secret phrase for building and validating JWTs:\n\n```bash\nphp artisan littlejwt:phrase\n```\n\n\u003e Information on generating different types of keys can be found in [the documentation](https://docs.getlittlejwt.com/json-web-keys#key-types).\n\n## Upgrading\n\n**IMPORTANT:** Before continuing, please note v2.0 is still in beta and is not recommended for production systems.\n\nCreate a backup of the config file:\n\n```bash\ncp config/littlejwt.php config/littlejwt.php.old\n```\n\nUpgrade the package via composer:\n\n```bash\ncomposer require little-apps/littlejwt:\"^2.3.0\"\n```\n\nPublish the new config file (overwriting the existing config file):\n\n```bash\nphp artisan vendor:publish --tag=\"littlejwt-config\" --existing\n```\n\n \u003e You will need to manually set the config file to match the old config file.\n\n## Usage\n\n### Building JWTs\n\n```php\nuse LittleApps\\LittleJWT\\Facades\\LittleJWT;\nuse LittleApps\\LittleJWT\\Build\\Builder;\n\n$jwt = LittleJWT::create(function (Builder $builder) {\n    $builder\n        // Adds claim 'abc' with value 'def' to header claims.\n        -\u003eabc('def', true)\n        // Adds claim 'ghi' with value 'klm' to payload claims.\n        -\u003eghi('klm')\n        // Adds claim 'nop' with value 'qrs' to payload claims.\n        -\u003enop('qrs', false);\n});\n\n$token = (string) $jwt;\n// $token = \"ey...\";\n```\n\n### Validating JWTs\n```php\nuse LittleApps\\LittleJWT\\Facades\\LittleJWT;\nuse LittleApps\\LittleJWT\\Validation\\Validator;\n\n$token = \"ey...\";\n\n$passes = LittleJWT::validateToken($token, function (Validator $validator) {\n    $validator\n        // Checks the value of the 'abc' claim in the header === (strictly equals) 'def'\n        -\u003eequals('abc', 'def', true, true)\n        // Checks the value of the 'ghi' claim in the payload == (equals) 'klm'\n        -\u003eequals('ghi', 'klm')\n        // Checks the value of the 'nop' claim in the payload === (strictly equals) 'qrs'\n        -\u003eequals('nop', 'qrs', true, false);\n});\n\nif ($passes) {\n    // JWT is valid.\n} else {\n    // JWT is invalid.\n}\n```\n\n## Further Documentation\n\nFurther documentation is located at [docs.getlittlejwt.com](https://docs.getlittlejwt.com/).\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n### Libraries\n\nLittle JWT is built using the following libraries:\n\n * [Laravel](https://laravel.com/)\n * [Laravel Package Skeleton](https://github.com/spatie/package-skeleton-laravel)\n * [PHP JWT Framework](https://github.com/web-token/jwt-framework)\n\n### Contributors\n\nThank you to the following for their contributions:\n\n- [Little Apps](https://github.com/little-apps)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-apps%2Flittlejwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittle-apps%2Flittlejwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-apps%2Flittlejwt/lists"}