Does anyone have an example of how to use regexsplit
Christopher Bongaarts
cab at umn.edu
Tue Sep 25 16:12:06 EDT 2012
On 9/25/2012 12:52 PM, Leonard Kroll wrote:
>
> Hi, I need to split the title attribute. I want to pull "Student", "Staff" and "Faculty" off the beginning of the attribute.
> i.e. "Faculty/pt", "Staff/ne", "Student/li"
>
> Does anyone have an example of regexsplit showing how to use it?
No, but might be able to give some suggestions...
> <resolver:AttributeDefinition xsi:type="ad:Scoped" id="eduPersonScopedAffiliation" scope="umb.edu"
> sourceAttributeID="title">
I think you want sourceAttributeID="SPLIT_TITLE" if you want your ePSA
to be based on the result of the splitting rather than the raw title
attribute.
> <resolver:Dependency ref="myLDAP" />
I think you have your dependencies backward if you want ePSA based on
the first part of the title. This one would be ref="SPLIT_TITLE".
> <resolver:AttributeDefinition xsi:type="RegexSplit" xmlns="urn:mace:shibboleth:2.0:resolver:ad"
> id="SPLIT_TITLE"
> sourceAttributeID="title"
> regex="[Student][Faculty][Staff]">
You need a Java 5 regex, with the first match group assigned as the
value... something like:
regex="^(Student|Faculty|Staff)"
> <resolver:Dependency ref="eduPersonScopedAffiliation" />
This one would ref="myLDAP".
--
%% Christopher A. Bongaarts %% cab at umn.edu %%
%% OIT - Identity Management %% http://umn.edu/~cab %%
%% University of Minnesota %% +1 (612) 625-1809 %%
More information about the users
mailing list