PHPackages                             phidias/oauth.api - 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. phidias/oauth.api

ActiveLibrary

phidias/oauth.api
=================

OAuth authentication endpoints

012PHP

Since Jan 17Pushed 3y ago7 watchersCompare

[ Source](https://github.com/phidias-sas/oauth.api)[ Packagist](https://packagist.org/packages/phidias/oauth.api)[ RSS](/packages/phidias-oauthapi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Phidias OAuth endpoints
-----------------------

[](#phidias-oauth-endpoints)

### Setup

[](#setup)

Import OAuth endpoints in your server

```
Server::import("vendor/phidias/oauth.api");

```

### Configuration

[](#configuration)

Define a credential validation function that takes username and password and return payload data.

Return false or throw exceptions when authentication fails

```
Phidias\Oauth\Controller::addCredentialsValidator(function ($username, $password) {
    // do your voodoo
    return $payload;
});

```

### Access the token payload globally from you application

[](#access-the-token-payload-globally-from-you-application)

```
use Phidias\Oauth\Token;

$payload = Token::getPayload();

if ($payload === null) {
    die("you are not authenticated");
}

echo "Welcome back, {$payload->firstName}!";

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 81.8% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8cafac3fae0077b8d51ef90c0827f28a348a106b5ca1bf7db6a4faf2e9faadd?d=identicon)[santiago-cortes](/maintainers/santiago-cortes)

---

Top Contributors

[![santiago-cortes](https://avatars.githubusercontent.com/u/5031935?v=4)](https://github.com/santiago-cortes "santiago-cortes (27 commits)")[![jfelipe11](https://avatars.githubusercontent.com/u/1210306?v=4)](https://github.com/jfelipe11 "jfelipe11 (4 commits)")[![andresmanzano](https://avatars.githubusercontent.com/u/20053054?v=4)](https://github.com/andresmanzano "andresmanzano (2 commits)")

### Embed Badge

![Health badge](/badges/phidias-oauthapi/health.svg)

```
[![Health](https://phpackages.com/badges/phidias-oauthapi/health.svg)](https://phpackages.com/packages/phidias-oauthapi)
```

PHPackages © 2026

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