PHPackages                             mimaen/simplesamlphp-module-hubandspoke - 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. mimaen/simplesamlphp-module-hubandspoke

ActiveSimplesamlphp-module

mimaen/simplesamlphp-module-hubandspoke
=======================================

SimpleSAMLphp utilities for Hub &amp; Spoke federations

01.8k3[1 issues](https://github.com/mimaen/simplesamlphp-module-hubandspoke/issues)[2 PRs](https://github.com/mimaen/simplesamlphp-module-hubandspoke/pulls)1PHP

Since Apr 13Pushed 7y ago2 watchersCompare

[ Source](https://github.com/mimaen/simplesamlphp-module-hubandspoke)[ Packagist](https://packagist.org/packages/mimaen/simplesamlphp-module-hubandspoke)[ RSS](/packages/mimaen-simplesamlphp-module-hubandspoke/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

\#Hub &amp; Spoke utilities for SimpleSAMLphp

\##TargetedID

A flexible way for generate one or more values for the [eduPersonTargetedId attribute](http://software.internet2.edu/eduperson/internet2-mace-dir-eduperson-201602.html#eduPersonTargetedID).

**hubandspoke:TargetedID** is an [Authentication Processing Filter](https://simplesamlphp.org/docs/stable/simplesamlphp-authproc) for SimpleSAMLphp, based on [core:TargetedID](https://simplesamlphp.org/docs/stable/core:authproc_targetedid) by Olav Morken, UNINETT AS.

This filter generates one or more values for the **eduPersonTargetedID** attribute, using:

- an attribute identifying the authenticated **user**
- (optionally) a value identifying the **SP** requesting authentication
- (optionally) a value identifying the **IdP**
- (optionally) a fixed random value for **salting** the result
- a **hash** algorithm

Configuration allows:

- set alternative attributes (in order of preference) to identify the user
- set alternative attributes (in order of preference) to identify the target
- set alternative attributes (in order of preference) to identify the IdP
- transform the target identifier
- filter SP and/or users (send a value only for matching entities)

Read the docs to see all the options.

\###Configuration samples

- eduPersonTargetedId with one unique **standard** value:

```
    'authproc' => array(
        50 => 'hubandspoke:TargetedID',
    ),
```

```
sha256(userID + '@@' + targetID + '@@' + sourceID)

```

- eduPersonTargetedId obfuscated with a **salt**:

```
    'authproc' => array(
        50 => array(
            'class' => 'hubandspoke:TargetedID',
            'salt'  => 'randomString',
        ),
    ),
```

```
sha256(salt + '@@' + userID + '@@' + targetID + '@@' + sourceID + '@@' + salt)

```

- eduPersonTargetedId with a different **formula**:

```
    'authproc' => array(
        50 => array(
            'class'  => 'hubandspoke:TargetedID',
            'userID' => 'Attributes/mail',
            'fields' => array('salt', 'userID', 'targetID'),
            'salt'   => 'randomString',
        ),
    ),
```

```
sha256(salt + '@@' + mail + '@@' + targetID)

```

- eduPersonTargetedId with **two** values:

```
    'authproc' => array(
        50 => array(
            'class'  => 'hubandspoke:TargetedID',
            'salt'   => 'randomString',
            'values' => array(
                'new' => array(
                    'fieldSeparator' => '//',
                ),
                'old' => array(
                    'hashFunction' => 'md5',
                    'fields'       => array('userID'),
                ),
            ),
        ),
    ),
```

```
sha256(salt + '//' + userID + '//' + targetID + '//' + sourceID + '//' + salt)
md5(userID)

```

- eduPersonTargetedId with two values **prefixed**:
    - one of them only for a specific SP (http://\*.example.com)
    - the other one for all SP, but considering the same SP all URL https://\*.blogs.example.com (same eduPersonTargetedId)

```
    'authproc' => array(
        50 => array(
            'class'  => 'hubandspoke:TargetedID',
            'salt'   => 'randomString',
            'values' => array(
                'new' => array(
                    'prefix'          => '{new}',
                    'targetTransform' => array(
                        '#^(https?://)[^./]+\.(blogs\.example\.com)(/|$).*$#' => '$1$2/',
                    ),
                ),
                'old' => array(
                    'prefix'       => '{old}',
                    'hashFunction' => 'md5',
                    'userID'       => array('Attributes/mail', 'UserID'),
                    'fields'       => 'userID',
                    'ifTarget'     => '#^https?://([^./]+\.)*example\.com(/|$)#',
                ),
            ),
        ),
    ),
```

```
'{new}' + sha256(salt + '@@' + userID + '@@' + targetID* + '@@' + sourceID + '@@' + salt)
'{old}' + md5(userID) 						  only for *.example.com

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

---

Top Contributors

[![mimaen](https://avatars.githubusercontent.com/u/9728288?v=4)](https://github.com/mimaen "mimaen (8 commits)")

### Embed Badge

![Health badge](/badges/mimaen-simplesamlphp-module-hubandspoke/health.svg)

```
[![Health](https://phpackages.com/badges/mimaen-simplesamlphp-module-hubandspoke/health.svg)](https://phpackages.com/packages/mimaen-simplesamlphp-module-hubandspoke)
```

PHPackages © 2026

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