Skip to content
Snippets Groups Projects
Commit 6c1b48db authored by Olav Morken's avatar Olav Morken
Browse files

Add RequestedAttributes to generated metadata.

Fixes issue 228.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2175 44740490-163a-0410-bde0-09ae8108e29a
parent 5be4705f
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,18 @@ Common options ...@@ -28,6 +28,18 @@ Common options
: Note that this only changes the values in the generated metadata and in the messages sent to others. You must also configure your webserver to deliver this URL to the correct PHP page. : Note that this only changes the values in the generated metadata and in the messages sent to others. You must also configure your webserver to deliver this URL to the correct PHP page.
`attributes`
: List of attributes this SP requests from the IdP.
This list will be added to the generated metadata.
: The attributes will be added without a `NameFormat` by default.
Use the `attributes.NameFormat` option to specify the `NameFormat` for the attributes.
: *Note*: This list will only be added to the metadata if the `name`-option is also specified.
`attributes.NameFormat`
: The `NameFormat` for the requested attributes.
`authproc` `authproc`
: Used to manipulate attributes, and limit access for each SP. See the [authentication processing filter manual](http://rnd.feide.no/content/authentication-processing-filters-simplesamlphp). : Used to manipulate attributes, and limit access for each SP. See the [authentication processing filter manual](http://rnd.feide.no/content/authentication-processing-filters-simplesamlphp).
...@@ -47,6 +59,8 @@ Common options ...@@ -47,6 +59,8 @@ Common options
'no' => 'En tjeneste', 'no' => 'En tjeneste',
), ),
: *Note*: For this to be added to the metadata, you must also specify the `attributes` and `name` options.
`host` `host`
: The hostname for this SP. One SP can also have the `host`-option set to `__DEFAULT__`, and that SP will be used when no other entries in the metadata matches. : The hostname for this SP. One SP can also have the `host`-option set to `__DEFAULT__`, and that SP will be used when no other entries in the metadata matches.
...@@ -92,23 +106,14 @@ Common options ...@@ -92,23 +106,14 @@ Common options
'no' => 'En tjeneste', 'no' => 'En tjeneste',
), ),
: *Note*: You must also specify at least one attribute in the `attributes` option for this element to be added to the metadata.
`NameIDFormat` `NameIDFormat`
: Override the default NameIDFormat in the generated metadata and in the authentication request. : Override the default NameIDFormat in the generated metadata and in the authentication request.
: The default value for SAML 2.0 is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`, while the default for Shibboleth 1.3 is `urn:mace:shibboleth:1.0:nameIdentifier`. If you set the value to `NULL`, the `samlp:NameIDPolicy` element is removed from the authentication request. : The default value for SAML 2.0 is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`, while the default for Shibboleth 1.3 is `urn:mace:shibboleth:1.0:nameIdentifier`. If you set the value to `NULL`, the `samlp:NameIDPolicy` element is removed from the authentication request.
`url`
: A URL to your service provider. Will be added as a OrganizationURL-element in the metadata.
: This option can be translated into multiple languages by specifying the value as an array of language-code to language-specific URL:
'url' => array(
'en' => 'http://sp.example.net/en/info.html',
'no' => 'http://sp.example.net/no/info.html',
),
SAML 2.0 options SAML 2.0 options
---------------- ----------------
......
...@@ -51,6 +51,12 @@ try { ...@@ -51,6 +51,12 @@ try {
} }
if (array_key_exists('attributes', $spmeta)) {
$metaArray['attributes'] = $spmeta['attributes'];
}
if (array_key_exists('attributes.NameFormat', $spmeta)) {
$metaArray['attributes.NameFormat'] = $spmeta['attributes.NameFormat'];
}
if (array_key_exists('name', $spmeta)) { if (array_key_exists('name', $spmeta)) {
$metaArray['name'] = $spmeta['name']; $metaArray['name'] = $spmeta['name'];
} }
......
...@@ -55,6 +55,12 @@ try { ...@@ -55,6 +55,12 @@ try {
$metaArray['OrganizationURL'] = $spmeta['OrganizationURL']; $metaArray['OrganizationURL'] = $spmeta['OrganizationURL'];
} }
if (array_key_exists('attributes', $spmeta)) {
$metaArray['attributes'] = $spmeta['attributes'];
}
if (array_key_exists('attributes.NameFormat', $spmeta)) {
$metaArray['attributes.NameFormat'] = $spmeta['attributes.NameFormat'];
}
if (array_key_exists('name', $spmeta)) { if (array_key_exists('name', $spmeta)) {
$metaArray['name'] = $spmeta['name']; $metaArray['name'] = $spmeta['name'];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment