On Monday 19 February 2007 15:29, Ben Butler wrote:
Hi,
I am having some problems with attr_rewrite.
What I want to do is the following at a pre authorisation phase:
User-Name = username@somedomain.com
To
User-Name = somedomain.com
I want to call by attr_rewrite function for each of the domains that I want to stip the username from prior to authorisation.
I'm not very familiar with attr_rewrite, so I'm posting what I would do if I were presented with this issue. We use the hints file to rewrite the request username, as needed. A hints file example that should do what you want: DEFAULT User-Name =~ "^.*@somedomain.com$" User-Name := "somedomain.com" Then just define somedomain.com in your users file (or DB) and process it like a normal request. Kevin Bonner