{"id":30329901,"url":"https://github.com/groton-school/slim-oauth2-api-proxy","last_synced_at":"2026-01-20T16:54:50.412Z","repository":{"id":308905453,"uuid":"1034462970","full_name":"groton-school/slim-oauth2-api-proxy","owner":"groton-school","description":"Server-side actions and routes for authenticating to and accessing the an OAuth2 API from a web client","archived":false,"fork":false,"pushed_at":"2025-10-15T19:12:33.000Z","size":142,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-16T20:21:15.386Z","etag":null,"topics":["cors-proxy","oauth2-client","rest-api","restful-api","slim-framework","slim4"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/groton-school.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-08T12:34:40.000Z","updated_at":"2025-10-08T17:47:53.000Z","dependencies_parsed_at":"2025-09-18T18:21:21.015Z","dependency_job_id":"e20659a3-f6fe-49dd-ad85-bc7edda26bb9","html_url":"https://github.com/groton-school/slim-oauth2-api-proxy","commit_stats":null,"previous_names":["groton-school/slim-spa-oauth2-client","groton-school/slim-oauth2-api-proxy"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/groton-school/slim-oauth2-api-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groton-school%2Fslim-oauth2-api-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groton-school%2Fslim-oauth2-api-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groton-school%2Fslim-oauth2-api-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groton-school%2Fslim-oauth2-api-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/groton-school","download_url":"https://codeload.github.com/groton-school/slim-oauth2-api-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groton-school%2Fslim-oauth2-api-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279653100,"owners_count":26205711,"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-10-18T02:00:06.492Z","response_time":62,"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":["cors-proxy","oauth2-client","rest-api","restful-api","slim-framework","slim4"],"created_at":"2025-08-18T02:06:38.435Z","updated_at":"2025-10-19T00:38:36.551Z","avatar_url":"https://github.com/groton-school.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# groton-school/slim-oauth2-api-proxy\n\nServer-side actions and routes for authenticating to and accessing an REST API from a web client\n\n[![Latest Version](https://img.shields.io/packagist/v/groton-school/slim-oauth2-api-proxy.svg)](https://packagist.org/packages/groton-school/slim-oauth2-api-proxy)\n\n## Install\n\n```bash\ncomposer require groton-school/oauth2-api-proxy\n```\n\n## Use\n\nDue to [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS) restrictions, a web app can't directly access an arbitrary REST API. This package provides a server-side proxy for the web client to use to access the REST API, storing the the user's API access tokens on the client side as web cookies.\n\n1. Implement `ProviderInterface`. This is intended to be done with one of the [`League/oauth2-client`](https://oauth2-client.thephpleague.com) implementations. See [groton-school/slim-canvas-api-proxy](https://github.com/groton-school/slim-canvas-api-proxy#readme) for a concrete example (which makes use of the `Defaults` traits provided for convenience).\n2. [Inject the implementation as a dependency.](https://github.com/groton-school/slim-skeleton/blob/0810344ec844912300e3834984d6a16893cde921/app/dependencies.php#L60-L68) (Of course, make sure that you store your API credentials somewhere secure!)\n3. [use `RouteBuilder` to define the necessary routes.](https://github.com/groton-school/slim-skeleton/blob/0810344ec844912300e3834984d6a16893cde921/app/routes.php#L23-L24)\n4. Access the client from a web app. A concrete example of this is [@groton/canvas-api.client.web](https://npmjs.com/package/@groton/canvas-api.client.web).\n\n### groton-school/slim-skeleton@dev-gae/lti-tool_canvas-api-proxy\n\n[groton-school/slim-skeleton's gae/lti-tool_canvas-api-proxy](https://github.com/groton-school/slim-skeleton/tree/gae/lti-tool_canvas-api-proxy) is the canonical example of how this shim is meant to be used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroton-school%2Fslim-oauth2-api-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroton-school%2Fslim-oauth2-api-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroton-school%2Fslim-oauth2-api-proxy/lists"}