PHPackages                             groton-school/slim-oauth2-api-proxy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. groton-school/slim-oauth2-api-proxy

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

groton-school/slim-oauth2-api-proxy
===================================

Server-side actions and routes for authenticating to and accessing an REST API from a web client

3.1.4(8mo ago)0289[4 issues](https://github.com/groton-school/slim-oauth2-api-proxy/issues)[1 PRs](https://github.com/groton-school/slim-oauth2-api-proxy/pulls)2GPL-3.0PHPCI passing

Since Aug 17Pushed 5mo agoCompare

[ Source](https://github.com/groton-school/slim-oauth2-api-proxy)[ Packagist](https://packagist.org/packages/groton-school/slim-oauth2-api-proxy)[ RSS](/packages/groton-school-slim-oauth2-api-proxy/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (14)Versions (14)Used By (2)

groton-school/slim-oauth2-api-proxy
===================================

[](#groton-schoolslim-oauth2-api-proxy)

Server-side actions and routes for authenticating to and accessing an REST API from a web client

[![Latest Version](https://camo.githubusercontent.com/1de8134fe4ca238c6525e81274c3985f2989e4acc639852046ce43ef7dc584ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67726f746f6e2d7363686f6f6c2f736c696d2d6f61757468322d6170692d70726f78792e737667)](https://packagist.org/packages/groton-school/slim-oauth2-api-proxy)

Install
-------

[](#install)

```
composer require groton-school/oauth2-api-proxy
```

Use
---

[](#use)

Due 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.

1. 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).
2. [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!)
3. [use `RouteBuilder` to define the necessary routes.](https://github.com/groton-school/slim-skeleton/blob/0810344ec844912300e3834984d6a16893cde921/app/routes.php#L23-L24)
4. 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).

### groton-school/slim-skeleton@dev-gae/lti-tool\_canvas-api-proxy

[](#groton-schoolslim-skeletondev-gaelti-tool_canvas-api-proxy)

[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.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance67

Regular maintenance activity

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

12

Last Release

252d ago

Major Versions

1.0.3 → 2.0.02025-09-09

2.0.0 → 3.0.02025-09-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/d0554a28104c65004c6de4d335ada25cf2763c8a9691dc5611314486d461fa4c?d=identicon)[battis](/maintainers/battis)

---

Top Contributors

[![battis](https://avatars.githubusercontent.com/u/419619?v=4)](https://github.com/battis "battis (66 commits)")

---

Tags

cors-proxyoauth2-clientrest-apirestful-apislim-frameworkslim4

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/groton-school-slim-oauth2-api-proxy/health.svg)

```
[![Health](https://phpackages.com/badges/groton-school-slim-oauth2-api-proxy/health.svg)](https://phpackages.com/packages/groton-school-slim-oauth2-api-proxy)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
