RegexSplit resolver returning no values
Morris, Andi
amorris at cardiffmet.ac.uk
Fri Jan 29 10:51:31 EST 2016
Hi Tom,
That's done it! I'm curious why my regex didn't work, but yes that does seem to now be passing the correct string across. Thanks.
I do see this message regarding the encoding, I just copied the encoding from another attribute resolver so I guess it doesn't work with regexsplit. Is this likely to cause any issues?:
-------------------------------------
Removing attribute PersonalRef, it can not be encoded via edu.internet2.middleware.shibboleth.common.attribute.encoding.SAML2NameIDEncoder
--------------------------------------
My resolver config now looks like:
<resolver:AttributeDefinition xsi:type="RegexSplit" xmlns="urn:mace:shibboleth:2.0:resolver:ad"
id="PersonalRef"
sourceAttributeID="description"
regex="^([0-9]+) .+$">
<resolver:Dependency ref="myLDAP" />
<resolver:AttributeEncoder
xsi:type="SAML1String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="PersonalRef" />
<resolver:AttributeEncoder
xsi:type="SAML2String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="PersonalRef"
friendlyName="PersonalRef" />
</resolver:AttributeDefinition>
Cheers,
Andi
-----Original Message-----
From: users [mailto:users-bounces at shibboleth.net] On Behalf Of Tom Scavo
Sent: 29 January 2016 14:54
To: Shib Users <users at shibboleth.net>
Subject: Re: RegexSplit resolver returning no values
On Fri, Jan 29, 2016 at 5:42 AM, Morris, Andi <amorris at cardiffmet.ac.uk> wrote:
>
> The attribute is declared as:
>
> <resolver:AttributeDefinition xsi:type="RegexSplit" xmlns="urn:mace:shibboleth:2.0:resolver:ad"
> id="PersonalRef"
> sourceAttributeID="description"
> regex="(\d{5})"> <resolver:Dependency
> ref="myLDAP" />
>
> </resolver:AttributeDefinition>
>
> I need to grab the first 5 digits from a string, an example of which is below:
>
> 12345 some text 12/01/17
>
> Can anyone advise please?
Try: "^([0-9]+) .+$"
but I'm not sure if this regex is appropriate for "RegexSplit".
Tom
--
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
________________________________
[Cardiff Metropolitan University - 150 years of nurturing talent]<http://www.cardiffmet.ac.uk/cardiffmet150>
More information about the users
mailing list