PHPackages                             froxlorgmbh/sso - 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. froxlorgmbh/sso

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

froxlorgmbh/sso
===============

PHP froxlor GmbH SSO Client for Laravel 10+

08PHP

Since Jun 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/froxlorGmbH/sso)[ Packagist](https://packagist.org/packages/froxlorgmbh/sso)[ RSS](/packages/froxlorgmbh-sso/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

froxlor GmbH SSO
================

[](#froxlor-gmbh-sso)

PHP froxlor GmbH SSO API Client for Laravel 10+

Table of contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Event Listener](#event-listener)
3. [Configuration](#configuration)
4. [Examples](#examples)
5. [Documentation](#documentation)
6. [Development](#Development)

Installation
------------

[](#installation)

```
composer require froxlorgmbh/sso

```

**If you use Laravel 10+ you are already done, otherwise continue.**

Add Service Provider to your `app.php` configuration file:

```
FroxlorGmbH\SSO\Providers\SSOServiceProvider::class,
```

Event Listener
--------------

[](#event-listener)

- Add `SocialiteProviders\Manager\SocialiteWasCalled` event to your `listen[]` array in `app/Providers/EventServiceProvider`.
- Add your listeners (i.e. the ones from the providers) to the `SocialiteProviders\Manager\SocialiteWasCalled[]` that you just created.
- The listener that you add for this provider is `'FroxlorGmbH\\SSO\\Socialite\\SSOExtendSocialite@handle',`.
- Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

```
/**
 * The event handler mappings for the application.
 *
 * @var array
 */
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // add your listeners (aka providers) here
        'FroxlorGmbH\\SSO\\Socialite\\SSOExtendSocialite@handle',
    ],
];

```

Configuration
-------------

[](#configuration)

Copy configuration to config folder:

```
$ php artisan vendor:publish --provider="FroxlorGmbH\SSO\Providers\SSOServiceProvider"

```

Add environmental variables to your `.env`

```
SSO_KEY=
SSO_SECRET=
SSO_REDIRECT_URI=http://localhost

```

You will need to add an entry to the services configuration file so that after config files are cached for usage in production environment (Laravel command `artisan config:cache`) all config is still available.

**Add to `config/services.php`:**

```
'sso' => [
    'client_id' => env('SSO_KEY'),
    'client_secret' => env('SSO_SECRET'),
    'redirect' => env('SSO_REDIRECT_URI')
],
```

Examples
--------

[](#examples)

#### Basic

[](#basic)

```
$sso = new FroxlorGmbH\SSO\SSO();

$sso->setClientId('abc123');

// Get SSH Key by User ID
$result = $sso->getSshKeysByUserId(38);

// Check, if the query was successfull
if ( ! $result->success()) {
    die('Ooops: ' . $result->error());
}

// Shift result to get single key data
$sshKey = $result->shift();

echo $sshKey->name;
```

#### Setters

[](#setters)

```
$sso = new FroxlorGmbH\SSO\SSO();

$sso->setClientId('abc123');
$sso->setClientSecret('abc456');
$sso->setToken('abcdef123456');

$sso = $sso->withClientId('abc123');
$sso = $sso->withClientSecret('abc123');
$sso = $sso->withToken('abcdef123456');
```

#### OAuth Tokens

[](#oauth-tokens)

```
$sso = new FroxlorGmbH\SSO\SSO();

$sso->setClientId('abc123');
$sso->setToken('abcdef123456');

$result = $sso->getAuthedUser();

$user = $userResult->shift();
```

```
$sso->setToken('uvwxyz456789');

$result = $sso->getAuthedUser();
```

```
$result = $sso->withToken('uvwxyz456789')->getAuthedUser();
```

#### Facade

[](#facade)

```
use FroxlorGmbH\SSO\Facades\SSO;

SSO::withClientId('abc123')->withToken('abcdef123456')->getAuthedUser();
```

Documentation
-------------

[](#documentation)

### Oauth

[](#oauth)

```
public function retrievingToken(string $grantType, array $attributes)
```

### PaymentIntents

[](#paymentintents)

```
public function getPaymentIntent(string $id)
public function createPaymentIntent(array $parameters)
```

### SshKeys

[](#sshkeys)

```
public function getSshKeysByUserId(int $id)
public function createSshKey(string $publicKey, string $name = NULL)
public function deleteSshKey(int $id)
```

### Users

[](#users)

```
public function getAuthedUser()
public function createUser(array $parameters)
```

[**OAuth Scopes Enums**](https://github.com/froxlorGmbH/sso/blob/main/src/Enums/Scope.php)

Development
-----------

[](#development)

#### Run Tests

[](#run-tests)

```
composer test
```

```
BASE_URL=xxxx CLIENT_ID=xxxx CLIENT_KEY=yyyy CLIENT_ACCESS_TOKEN=zzzz composer test
```

#### Generate Documentation

[](#generate-documentation)

```
composer docs
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% 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/f3fa78c7dc319f82eb5b2451690d017ee149ecc0783534a99c56ea4da7d39065?d=identicon)[d00p](/maintainers/d00p)

---

Top Contributors

[![d00p](https://avatars.githubusercontent.com/u/1757229?v=4)](https://github.com/d00p "d00p (5 commits)")[![envoyr](https://avatars.githubusercontent.com/u/81368729?v=4)](https://github.com/envoyr "envoyr (1 commits)")

### Embed Badge

![Health badge](/badges/froxlorgmbh-sso/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M119](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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