PHPackages                             ssoready/ssoready - 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. [API Development](/categories/api)
4. /
5. ssoready/ssoready

ActiveLibrary[API Development](/categories/api)

ssoready/ssoready
=================

SSOReady PHP Library

1.0.1(1y ago)336.1k↓12.1%2[1 PRs](https://github.com/ssoready/ssoready-php/pulls)MITPHPPHP ^8.1

Since Nov 18Pushed 1y agoCompare

[ Source](https://github.com/ssoready/ssoready-php)[ Packagist](https://packagist.org/packages/ssoready/ssoready)[ RSS](/packages/ssoready-ssoready/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

[![](https://camo.githubusercontent.com/45a5a956568b43b699da728472a343957fbc0721a213c3dd89a7324e81863362/68747470733a2f2f692e696d6775722e636f6d2f4f68746b68624a2e706e67)](https://camo.githubusercontent.com/45a5a956568b43b699da728472a343957fbc0721a213c3dd89a7324e81863362/68747470733a2f2f692e696d6775722e636f6d2f4f68746b68624a2e706e67)

SSOReady-PHP: SAML &amp; SCIM for PHP
=====================================

[](#ssoready-php-saml--scim-for-php)

[![](https://camo.githubusercontent.com/2df4564b68f58ff0d2ae13473e6927bd7de51a45d587320c08969797252307e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73736f72656164792f73736f7265616479)](https://packagist.org/packages/ssoready/ssoready)

`ssoready/ssoready` is a PHP SDK for the [SSOReady](https://ssoready.com) API.

SSOReady is a set of open-source dev tools for implementing Enterprise SSO. You can use SSOReady to add SAML and SCIM support to your product this afternoon.

For example applications built using SSOReady-PHP, check out:

- [SSOReady Example App: PHP + Laravel with SAML](https://github.com/ssoready/ssoready-example-app-php-laravel-saml)
- [SSOReady Example App: Vanilla PHP with SAML](https://github.com/ssoready/ssoready-example-app-php-saml)

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

[](#installation)

Add this dependency to your project's `composer.json`:

```
composer require ssoready/ssoready
```

Usage
-----

[](#usage)

This section provides a high-level overview of how SSOReady works, and how it's possible to implement SAML and SCIM in just an afternoon. For a more thorough introduction, visit the [SAML quickstart](https://ssoready.com/docs/saml/saml-quickstart) or the [SCIM quickstart](https://ssoready.com/docs/scim/scim-quickstart).

The first thing you'll do is create a SSOReady client instance:

```
$ssoready = new SSOReady\SSOReadyClient(); // loads api key from SSOREADY_API_KEY env var
```

### SAML in two lines of code

[](#saml-in-two-lines-of-code)

SAML (aka "Enterprise SSO") consists of two steps: an *initiation* step where you redirect your users to their corporate identity provider, and a *handling*step where you log them in once you know who they are.

To initiate logins, you'll use SSOReady's [Get SAML Redirect URL](https://ssoready.com/docs/api-reference/saml/get-saml-redirect-url)endpoint:

```
# this is how you implement a "Sign in with SSO" button
$redirectUrl = $ssoready->saml->getSAMLRedirectURL(new SSOReady\Saml\Requests\GetSamlRedirectUrlRequest([
    # the ID of the organization/workspace/team (whatever you call it)
    # you want to log the user into
    "organizationExternalId" => "...",
]))->redirectUrl;

# redirect the user to `$redirectUrl`...
```

You can use whatever your preferred ID is for organizations (you might call them "workspaces" or "teams") as your `organizationExternalId`. You configure those IDs inside SSOReady, and SSOReady handles keeping track of that organization's SAML and SCIM settings.

To handle logins, you'll use SSOReady's [Redeem SAML Access Code](https://ssoready.com/docs/api-reference/saml/redeem-saml-access-code) endpoint:

```
# this goes in your handler for POST /ssoready-callback
$redeemResult = $ssoready->saml->redeemSamlAccessCode(new SSOReady\Saml\Requests\RedeemSamlAccessCodeRequest([
    "samlAccessCode" => $_GET["saml_access_code"],
]));

$email = $redeemResult->email;
$organizationExternalId = $redeemResult->organizationExternalId;

# log the user in as `$email` inside `$organizationExternalId`...
```

You configure the URL for your `/ssoready-callback` endpoint in SSOReady.

### SCIM in one line of code

[](#scim-in-one-line-of-code)

SCIM (aka "Enterprise directory sync") is basically a way for you to get a list of your customer's employees offline.

To get a customer's employees, you'll use SSOReady's [List SCIM Users](https://ssoready.com/docs/api-reference/scim/list-scim-users) endpoint:

```
$listScimUsersResponse = $ssoready->scim->listScimUsers(new SSOReady\Scim\Requests\ListScimUsersRequest([
    "organizationExternalId" => "my_custom_external_id"
]));

# create users from each scim user
foreach ($listScimUsersResponse->scimUsers as $scimUser) {
    # every $scimUser has an id, email, attributes, and deleted
}
```

Contributing
------------

[](#contributing)

Issues and PRs are more than welcome. Be advised that this library is largely autogenerated from [`ssoready/docs`](https://github.com/ssoready/docs). Most code changes ultimately need to be made there, not on this repo.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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 ~0 days

Total

5

Last Release

591d ago

Major Versions

0.1.2 → 1.0.02024-11-20

### Community

Maintainers

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

---

Top Contributors

[![fern-api[bot]](https://avatars.githubusercontent.com/in/244756?v=4)](https://github.com/fern-api[bot] "fern-api[bot] (5 commits)")[![ucarion](https://avatars.githubusercontent.com/u/2180153?v=4)](https://github.com/ucarion "ucarion (2 commits)")

---

Tags

apisdkssoready

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M89](/packages/openai-php-laravel)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

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