{"id":23040764,"url":"https://github.com/stefmedjo/api-starter","last_synced_at":"2025-06-28T17:36:28.694Z","repository":{"id":128420730,"uuid":"399386304","full_name":"stefmedjo/api-starter","owner":"stefmedjo","description":"This is a starter project for any PHP Symfony API platform project with user creation and authentication (jwt access and refresh tokens implementation)","archived":false,"fork":false,"pushed_at":"2021-08-24T09:23:41.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T00:26:52.623Z","etag":null,"topics":["access-token","api","apiplatform","authentication","jwt","jwt-authentication","php","refresh-token","restful-api","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefmedjo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-08-24T08:12:14.000Z","updated_at":"2021-08-24T09:28:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e416279-8e7e-4f7c-86bd-2462b6dffa40","html_url":"https://github.com/stefmedjo/api-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stefmedjo/api-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefmedjo%2Fapi-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefmedjo%2Fapi-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefmedjo%2Fapi-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefmedjo%2Fapi-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefmedjo","download_url":"https://codeload.github.com/stefmedjo/api-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefmedjo%2Fapi-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262470460,"owners_count":23316501,"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":["access-token","api","apiplatform","authentication","jwt","jwt-authentication","php","refresh-token","restful-api","symfony"],"created_at":"2024-12-15T19:18:36.920Z","updated_at":"2025-06-28T17:36:28.662Z","avatar_url":"https://github.com/stefmedjo.png","language":"PHP","readme":"# API Platform starter\nThis is a starter for your API platform project.\n\n## Requirements\n* PHP 7.4\n* MySQL 5\n\n## Generate keys\nCreate a folder named jwt in config folder:\n```bash\nmkdir config/jwt\n```\nGenerate a private key using openssl\n```bash\nopenssl genrsa -out config/jwt/private.pem -aes256 4096\n```\nYou will have to provide a pass phrase.\n\nNext, you will generate the public key:\n```bash\nopenssl rsa -pubout -in config/jwt/private.pem -out config/jwt/public.pem\n```\nYou will have to provide the same pass phrase.\n\n## Configuration\nIn the config/packages/lexik_jwt_authentication.yaml file, you have to add\nthe token_ttl (An access token has a “time-to-live” (ttl), which is the maximum time that the access token will be valid for use within the application. 3600 seconds is 1 hour)\n\n## Add refresh token \n```bash\ncomposer require gesdinet/jwt-refresh-token-bundle\n```\nIn the file config/routes.yaml, add :\n```bash\ngesdinet_jwt_refresh_token:\n    path:       /token/refresh\n    controller: gesdinet.jwtrefreshtoken::refresh\n```\nIn the security, add this in the firewall section:\n```bash\n    refresh:\n        pattern:  ^/token/refresh\n        stateless: true\n        anonymous: true\n```\n\nCreate gesdinet_jwt_refresh_token.yaml in config/packages, and add :\n```bash\n  gesdinet_jwt_refresh_token:\n      ttl: 2592000\n      user_identity_field: email\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefmedjo%2Fapi-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefmedjo%2Fapi-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefmedjo%2Fapi-starter/lists"}