<div dir="ltr"><div>Thanks Peter.<div><br></div><div>For me this seems to work perfectly:</div><div><br></div><div> <util:list id="shibboleth.authn.Password.Transforms"><br> <bean parent="shibboleth.Pair" p:first="^(.+)@.*$" p:second="$1" /><br> </util:list><div></div></div></div><div><br></div><div>In our case the email address is just not desirable. In our LDAP the attribute exists but is not guaranteed to be accurate at all.</div><div><br></div><div><br></div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 20, 2021 at 7:51 AM Peter Schober <<a href="mailto:peter.schober@univie.ac.at">peter.schober@univie.ac.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">* Peter Schober <<a href="mailto:peter.schober@univie.ac.at" target="_blank">peter.schober@univie.ac.at</a>> [2021-02-20 13:44]:<br>
> * Mohamed Lrhazi <<a href="mailto:lrhazi@cua.edu" target="_blank">lrhazi@cua.edu</a>> [2021-02-19 22:22]:<br>
> > Sometimes our users enter their email address at our IdP login<br>
> > page... How would one go about removing @doma.ain part before<br>
> > authentication and any attribute processing etc....<br>
> <br>
> You could also simply authenticate on either the username *or* the<br>
> email adress making both work seamlessly, avoiding the need for any<br>
> transformations (whether in-browser or on the server).<br>
<br>
N.B.: That has a potential side-effect on what "the" authenticated<br>
principal is, then. E.g. if you're using the "PrincipalName"-type<br>
AttributeDefinition you'd end up with either an email address or a<br>
username.<br>
I'd avoid "PrincipalName" in attribute defintions if possible anyway<br>
and instead look up the -- hopefully normalized values -- from LDAP or<br>
your RDBMS, which also avoids any case inconsistencies.<br>
<br>
This also supports more complex transformations (going from<br>
email-adress to username or vice versa) than would be possible via<br>
regex-based Transformations. (E.g. in our deployment you can't derive<br>
the username from the email address at all, you'd have to perform a<br>
look-up.)<br>
<br>
-peter<br>
-- <br>
For Consortium Member technical support, see <a href="https://wiki.shibboleth.net/confluence/x/coFAAg" rel="noreferrer" target="_blank">https://wiki.shibboleth.net/confluence/x/coFAAg</a><br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net" target="_blank">users-unsubscribe@shibboleth.net</a><br>
</blockquote></div>