Hi,

I'm trying to configure my CAS Server 4 to allow users to authenticate with 
username *or *email within a mysql database (using JDBC). So, in my 
*primaryAuthenticationHandler *I set the sql like this:

SELECT password FROM users WHERE LOWER(?) IN (LOWER(username), LOWER(email)) 
AND 
NOT deleted

It works, but my problem is that I'm using a 
*SingleRowJdbcPersonAttributeDao *to retrieve user attributes. Something 
like this:

...
<constructor-arg index="1" value="SELECT ... FROM users WHERE {0}" />
<property name="queryAttributeMapping">
    <map>
<entry key="username" value="email" />
    </map>
</property>
...

Attributes are retrieved only when user log in with email (because query is 
translated as email=*username*).
So, I wonder if it's possible to have a query like this "...email=*username* OR 
username=*username*".

I really want to have login possible by username or email on my website.

Best regards,
Jonathan


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to