PHPackages                             tchoblond59/cubeauth - 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. tchoblond59/cubeauth

ActiveLibrary

tchoblond59/cubeauth
====================

Laravel Auth Service Provider for CUBE API

1.0(1y ago)09PHPPHP ^8.2

Since Jul 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tchoblond59/laravel-cube-auth)[ Packagist](https://packagist.org/packages/tchoblond59/cubeauth)[ RSS](/packages/tchoblond59-cubeauth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel CUBE Authentification
=============================

[](#laravel-cube-authentification)

Le package permet de se connecter à l'API CUBE tout en gardant le système Auth de laravel

Pour publier `php artisan vendor:publish --provider="Tchoblond59\CubeAuth\CubeApiUserProviderServiceProvider" --tag="config"`

Changer ensuite l'url cible dans le fichier `config/cube.php`

Dans le fichier `config/auth.php` changer les drivers de la section guard pour cube

```
'guards' => [
        'web' => [
            'driver' => 'cube',
            'provider' => 'users',
        ],
        'api' => [
            'driver' => 'cube',
            'provider' => 'users'
        ]
    ],
```

Puis dans la section providers:

```
'providers' => [
'users' => [
'driver' => 'cube',
'model' => Tchoblond59\CubeAuth\Models\CubeUser::class,
],
'cube' => [
'driver' => 'cube',
'model' => Tchoblond59\CubeAuth\Models\CubeUser::class,
],
],
```

Deux middleware sont disponible afin de sécuriser les routes: `EnsureTokenIsValid` et `HasCubeRole` qui permettent respectivement de vérifier qu'un token est valide et de vérifier si l'utilisateur dispose bien d'un role. Pour les utiliser:

- Editer le fichier `bootstrap/app.php` et ajouter a la section middleware: `$middleware->alias(['hasRole' => \Tchoblond59\CubeAuth\Middlewares\HasCubeRole::class]);`
- Vous pouvez ensuite pour protéger vos routes `Route::middleware(['auth', 'hasRole:OPERATEUR,SAV'])->get('/dashboard', function () {`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

684d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/773106c8055f51556bb329313a8cfeb94ffa731b3b52d71112cdb519335deaf7?d=identicon)[tchoblond59](/maintainers/tchoblond59)

### Embed Badge

![Health badge](/badges/tchoblond59-cubeauth/health.svg)

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

PHPackages © 2026

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