{"id":23231521,"url":"https://github.com/kuma-guy/bear.jwtauthmodule","last_synced_at":"2026-03-16T02:35:45.685Z","repository":{"id":57009860,"uuid":"59833074","full_name":"kuma-guy/BEAR.JwtAuthModule","owner":"kuma-guy","description":"JSON Web Token Authentication for BEAR.Sunday","archived":false,"fork":false,"pushed_at":"2018-06-18T03:53:22.000Z","size":31,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-18T09:46:54.205Z","etag":null,"topics":["bear","jwt-authentication"],"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/kuma-guy.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":"2016-05-27T12:32:52.000Z","updated_at":"2017-08-31T23:30:48.000Z","dependencies_parsed_at":"2022-08-21T15:10:11.094Z","dependency_job_id":null,"html_url":"https://github.com/kuma-guy/BEAR.JwtAuthModule","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuma-guy%2FBEAR.JwtAuthModule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuma-guy%2FBEAR.JwtAuthModule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuma-guy%2FBEAR.JwtAuthModule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuma-guy%2FBEAR.JwtAuthModule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuma-guy","download_url":"https://codeload.github.com/kuma-guy/BEAR.JwtAuthModule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230363932,"owners_count":18214717,"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":["bear","jwt-authentication"],"created_at":"2024-12-19T02:15:08.078Z","updated_at":"2025-10-28T01:38:08.321Z","avatar_url":"https://github.com/kuma-guy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BEAR.JwtAuthModule\n\n[![Build Status](https://travis-ci.org/kuma-guy/BEAR.JwtAuthModule.svg?branch=master)](https://travis-ci.org/kuma-guy/BEAR.JwtAuthModule) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/kuma-guy/BEAR.JwtAuthModule/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/kuma-guy/BEAR.JwtAuthModule/?branch=master)\n\nJSON Web Token Authentication for BEAR.Sunday\n\n## Installation\n\n### Composer install\n\n    $ composer require kuma-guy/jwt-auth-module\n \n### Module install\n\nThis package contains two modules for installing JSON Web Token Authentication.\n\n#### Symmetric way\n\n```php\nuse Ray\\Di\\AbstractModule;\nuse BEAR\\JwtAuth\\Auth\\Auth;\nuse BEAR\\JwtAuth\\SymmetricJwtAuthModule;\n\nclass AppModule extends AbstractModule\n{\n    protected function configure()\n    {\n        $this-\u003einstall(new SymmetricJwtAuthModule('symmetric algorithm', 'token time-to-live', 'secret'));\n        $this-\u003ebind(Auth::class)-\u003etoProvider(AuthProvider::class)-\u003ein(Scope::SINGLETON);\n    }\n}\n```\n\n#### Asymmetric way\n\n```php\nuse Ray\\Di\\AbstractModule;\nuse BEAR\\JwtAuth\\Auth\\Auth;\nuse BEAR\\JwtAuth\\AsymmetricJwtAuthModule;\n\nclass AppModule extends AbstractModule\n{\n    protected function configure()\n    {\n        $this-\u003einstall(new AsymmetricJwtAuthModule('asymmetric algorithm', 'token time-to-live', 'private key', 'public key', 'pass phrase'));\n        $this-\u003ebind(Auth::class)-\u003etoProvider(AuthProvider::class)-\u003ein(Scope::SINGLETON);\n    }\n}\n```\n\n### Authentication\n\nyour user is injected by auth provider, you need to add this line in your resource class\n\n```\nuse AuthInject;\n```\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuma-guy%2Fbear.jwtauthmodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuma-guy%2Fbear.jwtauthmodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuma-guy%2Fbear.jwtauthmodule/lists"}