Create parser pool interface and move current pool to an implementation of this inter...
[java-idp.git] / tests / data / attr-regex.resolver.1.xml
1 <AttributeResolver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:resolver:1.0" xsi:schemaLocation="urn:mace:shibboleth:resolver:1.0 shibboleth-resolver-1.0.xsd">
2
3         <RegExAttributeDefinition id="cn" regex="[\\](.)" replacement="$1" partialMatch="true">
4                 <AttributeDependency requires="_cn_"/>
5         </RegExAttributeDefinition>
6
7     <!-- Extract cn, but only if CN is the RDN. Ignore Case -->
8     <RegExAttributeDefinition id="_cn_" sourceName="dn"
9       regex='(^cn|[^\w]*cn) *= *(( ?([^, &lt;&gt;+=;#"\\]|[\\][, &lt;&gt;+=;#"\\]))+).*'
10       replacement="$2"
11       ignoreCase="true">
12       <DataConnectorDependency requires="file"/>
13     </RegExAttributeDefinition>
14
15     <!-- Extract uid, even if it is embedded inside the dn. Retrieve the first value of uid from the DN. Case sensitive,
16     since ignoreCase defaults to false -->
17     <RegExAttributeDefinition id="uid" 
18       regex="[\\](.)"
19       replacement="$1"
20       partialMatch="true">
21       <AttributeDependency requires="_uid_"/>
22     </RegExAttributeDefinition>
23
24     <RegExAttributeDefinition id="_uid_" sourceName="dn"
25       regex='(^uid|.*[^\w]uid) *= *(( ?([^, &lt;&gt;+=;#"\\]|[\\][, &lt;&gt;+=;#"\\]))+).*'
26       replacement="$2">
27       <DataConnectorDependency requires="file"/>
28     </RegExAttributeDefinition>
29
30     <CustomDataConnector id="file"
31       class="edu.internet2.middleware.shibboleth.aa.attrresolv.FileConnector"
32       datafile="data/attr-regex.datafile.1"
33       ordered="true"/>
34
35 </AttributeResolver>