{"id":15027287,"url":"https://github.com/reiterus/microapi-secure","last_synced_at":"2025-06-30T19:04:58.381Z","repository":{"id":152015758,"uuid":"624357800","full_name":"reiterus/microapi-secure","owner":"reiterus","description":"MicroApi Secure is a small engine for creating application APIs based on Symfony packages, which is a development of MicroApi Core.","archived":false,"fork":false,"pushed_at":"2023-04-12T05:58:55.000Z","size":94,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T19:04:56.408Z","etag":null,"topics":["api","api-rest","json-login","json-user","jwt","jwt-token","microapi","php","php81","reiterus","rest-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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reiterus.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-06T09:39:24.000Z","updated_at":"2024-05-23T11:20:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d79b6e4-db47-47ba-975b-72f64ad8ef35","html_url":"https://github.com/reiterus/microapi-secure","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/reiterus/microapi-secure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiterus%2Fmicroapi-secure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiterus%2Fmicroapi-secure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiterus%2Fmicroapi-secure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiterus%2Fmicroapi-secure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reiterus","download_url":"https://codeload.github.com/reiterus/microapi-secure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiterus%2Fmicroapi-secure/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262834786,"owners_count":23371849,"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":["api","api-rest","json-login","json-user","jwt","jwt-token","microapi","php","php81","reiterus","rest-api","symfony"],"created_at":"2024-09-24T20:06:08.135Z","updated_at":"2025-06-30T19:04:58.357Z","avatar_url":"https://github.com/reiterus.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroApi Secure\nMicroApi Secure is a small engine for creating **application APIs** \nbased on Symfony packages, which is a development of \n[MicroApi Core](https://github.com/reiterus/microapi-core) and contains security tools.\nSince MicroApi is based on the Symfony architecture,\nit can be developed to **any level of complexity** if desired.\nForming your application based on this engine,\nyou will always be sure that there is\n**nothing superfluous** in your code.\n\n### Features of MicroApi Secure out of the box\n- ability to \n  - create secure endpoints\n  - use JWT-tokens\n- authentication examples `base`, `json` and `token`\n- example of using a provider \n  - **in-memory**\n  - **in-json**\n- users list in a JSON-file\n- PhpStorm [http requests](http/admin.http) files\n- custom logger with named channels\n- 3 configuration files\n- examples of **testing REST API** endpoints\n\nSee also [core features](https://github.com/reiterus/microapi-core#microapi-core).\n\n#### Join the development of MicroApi!\n\n## Usage\nIt's very simple! Just run these two commands:\n- `composer create-project reiterus/microapi-secure folder \u0026\u0026 cd folder`\n- `make docker-start`\n\nThat's all!  \nNow your API app is available at http://localhost:8009\n\n## JWT\nTo get JWT-token just send http-request to endpoint. For example, `/admin`.\n\nTo check/decode this token send request to `jwt/decode` endpoint.\n```shell\nGET http://localhost:8009/jwt/decode\nAuthorization: Bearer some.jwt-token\n```\n\nJWT-token structure:\n```json\n{\n  \"iat\": 1681036036,\n  \"exp\": 1681036336,\n  \"sub\": \"admin.email@yandex.ru\",\n  \"user\": {\n    \"username\": \"admin\",\n    \"email\": \"admin.email@yandex.ru\",\n    \"roles\": [\n      \"ROLE_ADMIN\"\n    ]\n  }\n}\n```\n\n## Logger\n```shell\n# run command\ndocker-compose logs -ft api | grep MICROAPI\n# get log info\nMICROAPI: TOKEN_ACCESS: Invalid Access Token {\"token\":\"wrong.token.manager\"}\n```\n\n## Makefile commands\nFor the convenience of working with the project, there are several [make-commands](commands.md): local and for Docker.\n\n## Examples\nDefault response at `/admin` endpoint\n```json\n{\n  \"page\": \"Admin Account\",\n  \"identifier\": \"admin\",\n  \"roles\": [\n    \"ROLE_ADMIN\"\n  ]\n}\n```\n\n## Installation\nYou can install the project in two ways\n\nFrom packagist.org\n```shell\ncomposer create-project reiterus/microapi-secure\n```\n\nFrom GitHub repository\n```json\n{\n \"repositories\": [\n  {\n   \"type\": \"vcs\",\n   \"url\": \"https://github.com/reiterus/microapi-secure.git\"\n  }\n ]\n}\n```\n\n## License\n\nThis library is released under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiterus%2Fmicroapi-secure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freiterus%2Fmicroapi-secure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiterus%2Fmicroapi-secure/lists"}