Regex in the SHibboleth2.xml

Rick Hoodenpyle rhoodenpyle at rms-inc.com
Fri Apr 29 19:05:25 UTC 2022


I often have to separate username from the email address using the
following:



<!--<AttributeResolver type="Transform" source="upn">

              <Regex match="^(.+)@(.+)$" dest="LoginID">$1</Regex>

              <Regex match="^(.+)@(.+)$" dest="domain">$2</Regex>

</AttributeResolver>-->



I have a client though that passes an ID through the UID attribute. It
begins with a letter K and ends with the numerical ID, example K98456.



The value that this must equate to in my application is a numerical only
value, so I am needing to find out how to remove the K and only pass the
numbers. I have thought about maybe using the following, but have not had a
chance to test it and was wondering if someone out there might already know
how to do this.



<!--<AttributeResolver type="Transform" source="uid">

              <Regex match="^(.+)[0-9](.+)$" dest="kuid">$1</Regex>

</AttributeResolver>-->



Cheers,

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20220429/f8874500/attachment.htm>


More information about the users mailing list