Revision: 2175
Author: olavmrk
Date: Fri Feb 12 00:35:23 2010
Log: Add RequestedAttributes to generated metadata.
Fixes issue 228.
http://code.google.com/p/simplesamlphp/source/detail?r=2175
Modified:
/trunk/docs/simplesamlphp-reference-sp-hosted.txt
/trunk/www/saml2/sp/metadata.php
/trunk/www/shib13/sp/metadata.php
=======================================
--- /trunk/docs/simplesamlphp-reference-sp-hosted.txt Wed Feb 10 03:32:00
2010
+++ /trunk/docs/simplesamlphp-reference-sp-hosted.txt Fri Feb 12 00:35:23
2010
@@ -28,6 +28,18 @@
: 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`
: 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 @@
'no' => 'En tjeneste',
),
+: *Note*: For this to be added to the metadata, you must also specify
the `attributes` and `name` options.
+
`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.
@@ -92,23 +106,14 @@
'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`
: 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.
-`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
----------------
=======================================
--- /trunk/www/saml2/sp/metadata.php Wed Feb 10 03:32:00 2010
+++ /trunk/www/saml2/sp/metadata.php Fri Feb 12 00:35:23 2010
@@ -51,6 +51,12 @@
}
+ 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)) {
$metaArray['name'] = $spmeta['name'];
}
=======================================
--- /trunk/www/shib13/sp/metadata.php Wed Feb 10 03:32:00 2010
+++ /trunk/www/shib13/sp/metadata.php Fri Feb 12 00:35:23 2010
@@ -55,6 +55,12 @@
$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)) {
$metaArray['name'] = $spmeta['name'];
}
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en.