Add requestedAttributes to Metadata

Created on 12 September 2023, 10 months ago
Updated 21 September 2023, 9 months ago

Problem/Motivation

In a SAML request I need to specify the attributes I need to collect in an attributeConsumingService object with requestedAttributes.
I can't seem to find a config, where I can add these.

Am I missing it or is it just not a feature (yet)?

I have hardcoded them in the SamlService::reformatConfig to see it work.
The part I am adding is like this:

  protected static function reformatConfig(ImmutableConfig $config, $base_url = '', $purpose = '', KeyRepositoryInterface $key_repository = NULL) {
    $library_config = [
      'debug' => (bool) $config->get('debug_phpsaml'),
      'sp' => [
        'entityId' => $config->get('sp_entity_id'),

        'attributeConsumingService' => [
          "serviceName" => "Ignored",
          "requestedAttributes" => [
            [
              "name" => "https://data.gov.dk/model/core/specVersion",
              "isRequired" => true,
              "nameFormat" => "urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
            ],
            ...
          ]
        ],

        'assertionConsumerService' => [
✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡°Denmark NicklasMF

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024