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(6mo ago)0289[1 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 3mo 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 1mo ago

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

37

—

LowBetter than 83% of packages

Maintenance75

Regular maintenance activity

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

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

197d 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

[google/auth

Google Auth Library for PHP

1.4k272.7M161](/packages/google-auth)[simplesamlphp/saml2

SAML2 PHP library from SimpleSAMLphp

30317.2M40](/packages/simplesamlphp-saml2)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)[civicrm/civicrm-core

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

728272.9k17](/packages/civicrm-civicrm-core)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)

PHPackages © 2026

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