The RegexpSplit
attribute definition produces its values by applying a Java regular expression to each of the input attribute's values. For every input value that matches, the first match group is added as a new output value.
Schema Name and Location
This xsi:type
is defined by the urn:mace:shibboleth:2.0:resolver
schema 3.3, which is located at http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd.
Prior to V3.3 supplied plugins were defined by a schema type (xsi:type) in the urn:mace:shibboleth:2.0:resolver:ad schema, which is located at http://shibboleth.net/schema/idp/shibboleth-attribute-resolver-ad.xsd. This is still supported, but every element or type in the urn:mace:shibboleth:2.0:resolver:ad schema
has an equivalently named (but not necessarily identical) version in the urn:mace:shibboleth:2.0:resolver schema. The use of the urn:mace:shibboleth:2.0:resolver
schema also allows a relaxation of the ordering requirements of sub elements and so a more natural order can be applied. Note that versions earlier than 3.3 are no longer supported and you should look to upgrade at the soonest opportunity.
Attributes
Any of the common attributes can be specified. In addition, the following attributes may be provided:
Name | Type | Req? | Default | Description |
---|---|---|---|---|
regex | string | Y | Provides the regular expression to apply | |
caseSensitive | boolean | false | Whether the match is case sensitive or not |
Child Elements
Any of the common child elements can be specified.
Example
<AttributeDefinition id="exampleRegexp" xsi:type="RegexSplit" sourceAttributeID="uid" regex="Pre-(.+)-Post"> <Dependency ref="myLDAP" /> <AttributeEncoder xsi:type="SAML2String" name="http://example.org/example" friendlyName="regexp"/> </AttributeDefinition>
If this matcher was given an attribute with the input values "Fred", "Pre-And-Post", it would produce an output attribute with one value "And".