PHPackages                             safire-ac-za/simplesamlphp-module-entattribs - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. safire-ac-za/simplesamlphp-module-entattribs

ActiveSimplesamlphp-module[Authentication &amp; Authorization](/categories/authentication)

safire-ac-za/simplesamlphp-module-entattribs
============================================

SimpleSAMLphp module to convert entity attributes from metadata into attributes

v2.1.0(3mo ago)1200[1 PRs](https://github.com/tenet-ac-za/simplesamlphp-module-entattribs/pulls)MITPHP ^8.3

Since Jun 28Compare

[ Source](https://github.com/tenet-ac-za/simplesamlphp-module-entattribs)[ Packagist](https://packagist.org/packages/safire-ac-za/simplesamlphp-module-entattribs)[ RSS](/packages/safire-ac-za-simplesamlphp-module-entattribs/feed)WikiDiscussions Synced today

READMEChangelog (10)Dependencies (6)Versions (15)Used By (0)

entattribs:AttributeFromEntity
==============================

[](#entattribsattributefromentity)

[![Build Status](https://github.com/tenet-ac-za/simplesamlphp-module-entattribs/workflows/CI/badge.svg?branch=master)](https://github.com/tenet-ac-za/simplesamlphp-module-entattribs/workflows/CI/badge.svg?branch=master)[![Coverage Status](https://camo.githubusercontent.com/d36ae6549cffe5ea288bc17a1a60155d1126bc7b9a2990583800993a156bf171/68747470733a2f2f636f6465636f762e696f2f67682f74656e65742d61632d7a612f73696d706c6573616d6c7068702d6d6f64756c652d656e74617474726962732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/tenet-ac-za/simplesamlphp-module-entattribs)

This SimpleSAMLphp auth proc filter allows you to provides additional attributes from based on entity attributes in metadata. It is useful when entity metadata contains definitive information that you wish to convert into a SAML attribute (e.g. an entity attribute containing the value that should be used for *schacHomeOrganization* in remote IdP metadata).

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

[](#installation)

Once you have installed SimpleSAMLphp, installing this module is very simple. Just execute the following command in the root of your SimpleSAMLphp installation:

```
composer.phar require safire-ac-za/simplesamlphp-module-entattribs:dev-master

```

where `dev-master` instructs Composer to install the `master` (**development**) branch from the Git repository. See the [releases](https://github.com/tenet-ac-za/simplesamlphp-module-entattribs/releases)available if you want to use a stable version of the module

Usage
-----

[](#usage)

This module provides the *entattribs:AttributeFromEntity* auth proc filter, which can be used as follows:

```
50 => [
    'class'     => 'entattribs:AttributeFromEntity',
    '%replace',
    'urn:x-example:schacHomeOrganization' => 'schacHomeOrganization',
    'urn:x-example:schacHomeOrganizationType' => 'schacHomeOrganizationType',
],
```

Where the parameters are as follows:

- `class` - the name of the class, must be *entattribs:AttributeFromEntity*
- `%replace` - replace the values of any existing SAML attributes with those from the entity attributes. (Default is to create a multi-valued attribute unless `%ignore` is set.)
- `%ignore` - ignore any SAML attributes that already exist. (Default is to create a multi-valued attribute unless `%replace` is set.)
- `%skipsource` - do not look in the source metadata for entity attributes. (default is to check source metadata.)
- `%skipdest` - do not look in the destination metadata for entity attributes. (default is to check destination metadata.)

Any remaining key/value pairs are used to form a map between the entity attribute name (key) and the corresponding SAML attribute name to use (value).

The parameters `%replace` and `%ignore` are intended to be mutually exclusive and using them together will generate a warning.

Example
-------

[](#example)

If the above filter were applied following remote IdP metadata:

```
$metadata['https://idp.example.org/idp/shibboleth'] = [
    /* ... */
    'EntityAttributes' => [
        'urn:x-example:schacHomeOrganization' => 'example.org',
        'urn:x-example:schacHomeOrganizationType' => 'urn:schac:homeOrganizationType:int:other',
    ],
    /* ... */
];
```

it would result in the following attributes:

```
$attributes = [
    'schacHomeOrganization' => 'example.org',
    'schacHomeOrganizationType' => 'urn:schac:homeOrganizationType:int:other',
];
```

and any existing values of those two attributes would have been lost/replaced.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance80

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

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

Recently: every ~313 days

Total

11

Last Release

106d ago

Major Versions

v1.6 → v2.0.02023-03-10

PHP version history (6 changes)v1.5PHP &gt;=5.6

v1.6PHP &gt;=7.4

v2.0.0PHP &gt;=7.4 || ^8.0

v2.0.1PHP ^8.0

v2.0.2PHP ^8.1

v2.1.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7996633?v=4)[Guy Halse](/maintainers/ghalse)[@ghalse](https://github.com/ghalse)

![](https://avatars.githubusercontent.com/u/20838460?v=4)[TENET](/maintainers/tenet-ac-za)[@tenet-ac-za](https://github.com/tenet-ac-za)

---

Tags

simplesamlphpentityattributeentattribs

### Embed Badge

![Health badge](/badges/safire-ac-za-simplesamlphp-module-entattribs/health.svg)

```
[![Health](https://phpackages.com/badges/safire-ac-za-simplesamlphp-module-entattribs/health.svg)](https://phpackages.com/packages/safire-ac-za-simplesamlphp-module-entattribs)
```

###  Alternatives

[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.8M212](/packages/simplesamlphp-simplesamlphp)[simplesamlphp/saml2

SAML2 PHP library from SimpleSAMLphp

30518.0M41](/packages/simplesamlphp-saml2)[simplesamlphp/simplesamlphp-module-webauthn

A PHP implementation of a FIDO2 / WebAuthn authentication agent

181.6k](/packages/simplesamlphp-simplesamlphp-module-webauthn)

PHPackages © 2026

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