<div dir="auto"><div>Are there any examples with <span style="font-family:sans-serif">PostAuthSelectHook?</span><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il gio 7 mar 2019, 18:01 Heikki Vatiainen <<a href="mailto:hvn@open.com.au" target="_blank" rel="noreferrer">hvn@open.com.au</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 06/03/2019 12.47, Gianlu Bol wrote:<br>
<br>
> is it possible to use the RewriteUsername with variable? example RewriteUsername s/^([^@]+)/$MyVariable/<br>
> <br>
> I have to change the User-Name looking in a SQL DB (from the original username to different value in a specifica column)<br>
<br>
If the desired value ($MyVariable) is fetched from the SQL, you could <br>
consider doing it with PostAuthSelectHook<br>
<br>
<a href="https://open.com.au/radiator/ref/PostAuthSelectHook.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://open.com.au/radiator/ref/PostAuthSelectHook.html</a><br>
<br>
If you need to rewrite it before a SQL query, you could consider <br>
PreAuthHook:<br>
<a href="https://open.com.au/radiator/ref/PreAuthHook.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://open.com.au/radiator/ref/PreAuthHook.html</a><br>
<br>
With PreAuthHook you can change the username directly, or add a new <br>
attribute with desired value to the current request and configure SQL <br>
lookup to use the new variable.<br>
<br>
There are likely multiple other ways to do this, but the details depend <br>
on knowing more of your configuration and requirements.<br>
<br>
Thanks,<br>
Heikki<br>
<br>
-- <br>
Heikki Vatiainen <<a href="mailto:hvn@open.com.au" rel="noreferrer noreferrer" target="_blank">hvn@open.com.au</a>><br>
<br>
Radiator: the most portable, flexible and configurable RADIUS server<br>
anywhere. SQL, proxy, DBM, files, LDAP, TACACS+, PAM, Active Directory,<br>
EAP, TLS, TTLS, PEAP, WiMAX, RSA, Vasco, Yubikey, HOTP, TOTP,<br>
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, etc.<br>
_______________________________________________<br>
radiator mailing list<br>
<a href="mailto:radiator@lists.open.com.au" rel="noreferrer noreferrer" target="_blank">radiator@lists.open.com.au</a><br>
<a href="https://lists.open.com.au/mailman/listinfo/radiator" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.open.com.au/mailman/listinfo/radiator</a><br>
</blockquote></div></div></div>