PHPackages                             liblynx-llc/liblynx-connect-php - 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. liblynx-llc/liblynx-connect-php

ActiveLibrary

liblynx-llc/liblynx-connect-php
===============================

PHP client for LibLynx Connect identity and access management API

0.2.0-alpha(8y ago)02.8k1[2 issues](https://github.com/liblynx-llc/liblynx-connect-php/issues)MITPHPPHP ~7.0

Since Feb 16Pushed 6y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

liblynx-connect-php
===================

[](#liblynx-connect-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/59ca3a445ba854e97a068b0a7cd0986540ae952df37e73c71ba00b004bcce473/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c69626c796e782d6c6c632f6c69626c796e782d636f6e6e6563742d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/liblynx-llc/liblynx-connect-php)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/c5ce826793a8323350186db751723397581dc9bd2e5c71de93cbec741b422903/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c69626c796e782d6c6c632f6c69626c796e782d636f6e6e6563742d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/liblynx-llc/liblynx-connect-php)[![Coverage Status](https://camo.githubusercontent.com/fa92e859e99b9876459421e45b19943c2c8ca41418204a18ed9378b57d468236/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c69626c796e782d6c6c632f6c69626c796e782d636f6e6e6563742d7068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/liblynx-llc/liblynx-connect-php/code-structure)[![Quality Score](https://camo.githubusercontent.com/6045f8aed0b3747aac42e608898724ac6f806ec42e904611ec021fe3106e1a8a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c69626c796e782d6c6c632f6c69626c796e782d636f6e6e6563742d7068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/liblynx-llc/liblynx-connect-php)[![Total Downloads](https://camo.githubusercontent.com/89199563df1b1c93ebb83748611e93c5ad3bacdf99f3b57b3d84f85053207a52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c69626c796e782d6c6c632f6c69626c796e782d636f6e6e6563742d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/liblynx-llc/liblynx-connect-php)

This is a PHP client library for the LibLynx Connect identity and access management API. The API allows a publisher to control access to electronic resources without being concerned about the method used, e.g. IP, Shibboleth, SAML, OpenID Connect etc.

**This library is open source, but access to the API requires a commercial agreement with LibLynx - contact us at to discuss your requirements.**

Install
-------

[](#install)

Via Composer

```
$ composer require liblynx-llc/liblynx-connect-php
```

Setting API credentials
-----------------------

[](#setting-api-credentials)

In order to use this, you will need an API client id and client secret from LibLynx. These can be passed to the API client in one of two ways

### Set API credentials through environment variables

[](#set-api-credentials-through-environment-variables)

You can set the following environment variables to avoid placing credentials in your code

- LIBLYNX\_CLIENT\_ID
- LIBLYNX\_CLIENT\_SECRET

### Set API credentials through code

[](#set-api-credentials-through-code)

Alternatively, you can set the credentials directly, e.g.

```
$liblynx=new Liblynx\Connect\Client;
$liblynx->setCredentials('your client id', 'your client secret');
```

Caching
-------

[](#caching)

To work as efficiently as possible, the client caches API responses such as the entrypoint resource. Any PSR-16 compatible cache can be used, for example [symfony/cache](https://packagist.org/packages/symfony/cache)

For testing, you could use the `ArrayCache` from symfony/cache - install as follows:

```
$ composer require symfony/cache
```

Then create and use an `ArrayCache` as follows

```
$cache=new \Symfony\Component\Cache\Simple\ArrayCache;
$liblynx->setCache($cache);
```

Diagnostic logging
------------------

[](#diagnostic-logging)

Detailed information on API usage can be obtained by passing a PSR-3 compatible logger to the client. This package includes a useful `DiagnosticLogger` class which can be used to store logs and then output them for console or HTML reading.

```
$logger = new \LibLynx\Connect\DiagnosticLogger;
$liblynx->setLogger($logger);
```

Examples
--------

[](#examples)

A simple integration involves obtaining an account from data provided in the current request superglobals

```
try {
    $identification = $liblynx->authorize(IdentificationRequest::fromArray($_SERVER));
    if ($identification->isIdentified()) {
        //visitor is identified, you can now check their access rights
    } elseif ($identification->requiresWAYF()) {
         //to find our who the visitor is, redirect to WAYF page
         $url = $identification->getWayfUrl();
         header("Location: $url");
         exit;
    } else {
        //liblynx failed - check diagnostic logs
    }
} catch (LibLynx\Connect\Exception\LibLynxException $e) {
    //exceptions are throw for API failures and erroneous integrations
    throw $e;
}
```

See the `examples` folder for other examples:

- `examples\example.php` is a console application which prompts for an IP and URL performs an identification.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Paul Dixon](https://github.com/lordelph)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.7% 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 ~2 days

Total

2

Last Release

3006d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b3bceee90d0babe0c0e67e06038f86ebfece745c00e9a3d8645e36762370d2f?d=identicon)[lordelph](/maintainers/lordelph)

---

Top Contributors

[![lordelph](https://avatars.githubusercontent.com/u/444004?v=4)](https://github.com/lordelph "lordelph (43 commits)")[![dannylepage](https://avatars.githubusercontent.com/u/1552482?v=4)](https://github.com/dannylepage "dannylepage (1 commits)")

---

Tags

connectLibLynx

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/liblynx-llc-liblynx-connect-php/health.svg)

```
[![Health](https://phpackages.com/badges/liblynx-llc-liblynx-connect-php/health.svg)](https://phpackages.com/packages/liblynx-llc-liblynx-connect-php)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[civicrm/civicrm-core

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

728272.9k20](/packages/civicrm-civicrm-core)[nutgram/nutgram

The Telegram bot library that doesn't drive you nuts

714214.9k8](/packages/nutgram-nutgram)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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