I tried a lot of variants before posting my topic, but I'm not familiar 
with these kind of configuration files.
Maybe can you please explain me how use a collection in this case?


On Thursday, October 9, 2014 4:28:47 PM UTC+2, Misagh Moayyed wrote:
>
> Have you tried using a collection of values instead of a single “email”?
>
>  
>
> *From:* Jonatha Luthi [mailto:fest...@gmail.com <javascript:>] 
>
>
> *Sent:* Thursday, October 9, 2014 6:48 AM
> *To:* cas-...@lists.jasig.org <javascript:>
> *Subject:* [cas-user] Cas 4 - sql authentication with username or email 
> and retrieve person attribute
>
>  
>
> 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 cas-...@lists.jasig.org <javascript:> as: 
> mmoa...@unicon.net <javascript:>
>
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
> -- 
> You are currently subscribed to cas-...@lists.jasig.org <javascript:> as: 
> jasig-cas-user...@googlegroups.com <javascript:>
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
>
-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to