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 3d 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 3d 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

44

—

FairBetter than 92% of packages

Maintenance55

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

431d 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 (5 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

[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[mimmi20/browser-detector

Library to detect Browsers and Devices

48153.5k3](/packages/mimmi20-browser-detector)[discord-php/http

Handles HTTP requests to Discord servers

25318.7k8](/packages/discord-php-http)

PHPackages © 2026

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