{"id":15370008,"url":"https://github.com/evansims/openfga-php","last_synced_at":"2025-09-20T07:31:49.213Z","repository":{"id":234200891,"uuid":"741102206","full_name":"evansims/openfga-php","owner":"evansims","description":"Stop writing authorization logic. Start asking questions. OpenFGA high performance relationship-based access control for PHP.","archived":false,"fork":false,"pushed_at":"2025-09-09T12:34:09.000Z","size":4550,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-09T15:46:11.500Z","etag":null,"topics":["abac","authorization","entitlements","fga","fine-grained-access-control","fine-grained-authorization","openfga","pbac","permissions","php","rbac","rebac","sdk","security","zanzibar"],"latest_commit_sha":null,"homepage":"https://openfga.dev","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"loconox/openfga-php","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evansims.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-09T17:44:18.000Z","updated_at":"2025-09-07T03:53:41.000Z","dependencies_parsed_at":"2024-04-18T13:29:37.085Z","dependency_job_id":"5b224704-3963-4769-96fc-0058f48ccd65","html_url":"https://github.com/evansims/openfga-php","commit_stats":null,"previous_names":["evansims/openfga-php"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/evansims/openfga-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fopenfga-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fopenfga-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fopenfga-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fopenfga-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evansims","download_url":"https://codeload.github.com/evansims/openfga-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fopenfga-php/sbom","scorecard":{"id":394247,"data":{"date":"2025-06-12T23:48:21Z","repo":{"name":"github.com/evansims/openfga-php","commit":"e419c9a64082e099fd27c1c4b07e9a087b454b42"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":6.6,"checks":[{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: .github/SECURITY.md:1","Info: Found linked content: .github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/SECURITY.md:1","Info: Found text in security policy: .github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Code-Review","score":2,"reason":"Found 7/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/security-code-analysis.yml:19","Info: jobLevel 'contents' permission set to 'read': .github/workflows/security-code-analysis.yml:17","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/security-sbom.yml:26","Warn: jobLevel 'packages' permission set to 'write': .github/workflows/security-sbom.yml:27","Info: topLevel 'pull-requests' permission set to 'read': .github/workflows/quality-commit-standards.yml:9","Info: topLevel 'contents' permission set to 'read': .github/workflows/quality-commit-standards.yml:8","Info: topLevel 'contents' permission set to 'read': .github/workflows/quality-static-analysis.yml:11","Warn: no topLevel permission defined: .github/workflows/security-code-analysis.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/security-dependencies.yml:15","Info: topLevel 'contents' permission set to 'read': .github/workflows/security-dependency-review.yml:8","Info: topLevel 'contents' permission set to 'read': .github/workflows/security-sbom.yml:19","Info: topLevel 'contents' permission set to 'read': .github/workflows/test-contract.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/test-integration.yml:9","Info: topLevel 'contents' permission set to 'read': .github/workflows/test-unit.yml:11"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:  14 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:  29 out of  29 third-party GitHubAction dependencies pinned","Info:   1 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.3.0 not signed: https://api.github.com/repos/evansims/openfga-php/releases/224193823","Warn: release artifact v1.2.0 not signed: https://api.github.com/repos/evansims/openfga-php/releases/222345339","Warn: release artifact v1.1.0 not signed: https://api.github.com/repos/evansims/openfga-php/releases/222007592","Warn: release artifact v1.0.0 not signed: https://api.github.com/repos/evansims/openfga-php/releases/221736859","Warn: release artifact v1.3.0 does not have provenance: https://api.github.com/repos/evansims/openfga-php/releases/224193823","Warn: release artifact v1.2.0 does not have provenance: https://api.github.com/repos/evansims/openfga-php/releases/222345339","Warn: release artifact v1.1.0 does not have provenance: https://api.github.com/repos/evansims/openfga-php/releases/222007592","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/evansims/openfga-php/releases/221736859"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"CII-Best-Practices","score":5,"reason":"badge detected: Passing","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (11) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":1,"reason":"branch protection is not maximal on development and all release branches","details":["Warn: 'allow deletion' enabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Info: 'last push approval' is required to merge on branch 'main'","Info: 'up-to-date branches' is required to merge on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"Contributors","score":10,"reason":"project has 6 contributing companies or organizations","details":["Info: found contributions from: auth0, auth0-samples, momentful, openfga, psr-discovery, psr-mock"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"11 out of 11 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-08-18T18:34:26.953Z","repository_id":234200891,"created_at":"2025-08-18T18:34:26.954Z","updated_at":"2025-08-18T18:34:26.954Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274647452,"owners_count":25324292,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["abac","authorization","entitlements","fga","fine-grained-access-control","fine-grained-authorization","openfga","pbac","permissions","php","rbac","rebac","sdk","security","zanzibar"],"created_at":"2024-10-01T13:39:34.778Z","updated_at":"2025-09-20T07:31:49.178Z","avatar_url":"https://github.com/evansims.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\u003ca href=\"https://openfga.dev\"\u003e\u003cimg src=\".github/openfga.png\" width=\"100\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\n  \u003ch1\u003eOpenFGA PHP SDK\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://codecov.io/gh/evansims/openfga-php\" target=\"_blank\"\u003e\u003cimg src=\"https://codecov.io/gh/evansims/openfga-php/graph/badge.svg?token=DYXXS91T0S\" alt=\"codecov\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://shepherd.dev/github/evansims/openfga-php\" target=\"_blank\"\u003e\u003cimg src=\"https://shepherd.dev/github/evansims/openfga-php/coverage.svg\" alt=\"Psalm Type Coverage\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.bestpractices.dev/projects/10666\"\u003e\u003cimg src=\"https://www.bestpractices.dev/projects/10666/badge\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003eStop writing authorization logic. Start asking questions.\u003c/p\u003e\n\n  \u003cp\u003e\u003ccode\u003ecomposer require evansims/openfga-php\u003c/code\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\u003cbr /\u003e\u003c/p\u003e\n\n**Every app needs permissions.** Most developers end up with authorization logic scattered across controllers, middleware, and business logic. Changes break things. New features require touching dozens of files.\n\n**[OpenFGA](https://openfga.dev/) solves this.** Define your authorization rules once, query them anywhere. This SDK provides a modern PHP interface to [OpenFGA](https://openfga.dev/) and [Auth0 FGA](https://auth0.com/fine-grained-authorization).\n\n\u003cp\u003e\u003cbr /\u003e\u003c/p\u003e\n\n## Installation\n\n```bash\ncomposer require evansims/openfga-php\n```\n\n\u003cp\u003e\u003cbr /\u003e\u003c/p\u003e\n\n## Quickstart\n\n```php\nuse OpenFGA\\Client;\nuse function OpenFGA\\{allowed, tuple};\n\n$client = new Client(url: 'http://localhost:8080');\n\n// Instead of scattered if statements in your controllers:\nif ($user-\u003eisAdmin() || $user-\u003eowns($document) || $user-\u003eteam-\u003ecanEdit($document)) {\n    // ...\n}\n\n// Ask OpenFGA:\n$canEdit = allowed(\n    client: $client,\n    store: 'my-store',\n    model: 'my-model',\n    tuple: tuple('user:alice', 'editor', 'document:readme')\n);\n\n// Zero business logic coupling. Pure authorization.\n```\n\nSee [the documentation](https://github.com/evansims/openfga-php/wiki) to get started.\n\n\u003cp\u003e\u003cbr /\u003e\u003c/p\u003e\n\n## Contributing\n\nContributions are welcome—have a look at our [contributing guidelines](.github/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevansims%2Fopenfga-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevansims%2Fopenfga-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevansims%2Fopenfga-php/lists"}