PHPackages                             emartech/session-validator-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. emartech/session-validator-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

emartech/session-validator-client
=================================

PHP client for Emarsys session validator service

4.0.0(1y ago)12.0k[5 issues](https://github.com/emartech/session-validator-client-php/issues)1MITPHPPHP &gt;=8.1CI passing

Since Aug 3Pushed 3w ago17 watchersCompare

[ Source](https://github.com/emartech/session-validator-client-php)[ Packagist](https://packagist.org/packages/emartech/session-validator-client)[ Docs](https://github.com/emartech/session-validator-client-php)[ RSS](/packages/emartech-session-validator-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (5)Versions (6)Used By (1)

Session Validator Client PHP
============================

[](#session-validator-client-php)

PHP client for Emarsys session validator service

Install
-------

[](#install)

```
composer require emartech/session-validator-client
```

Usage
-----

[](#usage)

### Create client

[](#create-client)

Escher example:

```
$client = Client::create('https://session-validator.gservice.emarsys.net', 'escher_key', 'escher_secret');
```

mTLS example:

```
$client = Client::create('http://session-validator-web.security');
```

### Check Session Validity

[](#check-session-validity)

`isValid` provides a function to validate user session using either a `msId` or a `sessionDataToken`.

NameTypeThrowsDescription`msId``string`-Deprecated and will be removed in the future`sessionDataToken``string``SessionDataError````
var_dump($client->isValid('msid'));
```

```
var_dump($client->isValid('session-data-token'));
```

### Batch validating multiple MSIDs

[](#batch-validating-multiple-msids)

Returns an array of the invalid MSIDs.

> Warning: The batch validation is deprecated and will be removed in the future.

```
var_dump($client->filterInvalid(['msid1', 'msid2']));
```

### Caching results

[](#caching-results)

```
$client = Client::create('https://session-validator.gservice.emarsys.net', 'escher_key', 'escher_secret');
$cachedClient = CachedClient::create($client);

var_dump($cachedClient->isValid('msid')); // OR
var_dump($cachedClient->isValid('session-data-token'));
```

### Fetch session data

[](#fetch-session-data)

`getSessionData` provides a function to fetch user session data object using a `sessionDataToken`.

```
const sessionData = $client->getSessionData('session-data-token');
```

### Logging

[](#logging)

To enable logging, add a PSR-3 compatible logger to the client

```
use Monolog\Logger;

$client->setLogger(new Logger('name'));
```

### Local development

[](#local-development)

```
make install
make test
make style
```

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance51

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~603 days

Total

5

Last Release

478d ago

Major Versions

1.0.0 → 2.0.02022-04-01

2.0.1 → 3.0.02024-08-03

3.0.0 → 4.0.02025-03-10

PHP version history (3 changes)1.0.0PHP ^5.6 || ^7.0

2.0.0PHP ^8.0

3.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![dsztanko](https://avatars.githubusercontent.com/u/19249643?v=4)](https://github.com/dsztanko "dsztanko (9 commits)")[![knagy](https://avatars.githubusercontent.com/u/77399?v=4)](https://github.com/knagy "knagy (6 commits)")[![halaz-lazlo](https://avatars.githubusercontent.com/u/6322042?v=4)](https://github.com/halaz-lazlo "halaz-lazlo (3 commits)")[![Borcsa134](https://avatars.githubusercontent.com/u/25614829?v=4)](https://github.com/Borcsa134 "Borcsa134 (1 commits)")[![potato](https://avatars.githubusercontent.com/u/130068?v=4)](https://github.com/potato "potato (1 commits)")[![stoiet](https://avatars.githubusercontent.com/u/5140357?v=4)](https://github.com/stoiet "stoiet (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/emartech-session-validator-client/health.svg)

```
[![Health](https://phpackages.com/badges/emartech-session-validator-client/health.svg)](https://phpackages.com/packages/emartech-session-validator-client)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M19.8k](/packages/laravel-framework)[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k869.4M8.6k](/packages/symfony-http-kernel)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k13](/packages/tempest-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M412](/packages/drupal-core-recommended)[civicrm/civicrm-core

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

751291.4k40](/packages/civicrm-civicrm-core)

PHPackages © 2026

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