Hello Misagh,
We are trying to configure apereo cas server with a mysql database. We have
successfully managed to setup the connection and fetch all the attributes.
In our case we want the user to login via the email. So we have configured
the main auth functionality as shown below.
cas.authn.jdbc.query[0].sql=SELECT * FROM users WHERE email=?
cas.authn.jdbc.query[0].healthQuery=
cas.authn.jdbc.query[0].isolateInternalQueries=false
cas.authn.jdbc.query[0].url=jdbc:mysql://example/cas_server_db
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect
cas.authn.jdbc.query[0].user=exampleUser
cas.authn.jdbc.query[0].password=examplePass
cas.authn.jdbc.query[0].driverClass=com.mysql.jdbc.Driver
cas.authn.jdbc.query[0].fieldPassword=password
cas.authn.jdbc.query[0].passwordEncoder.type=org.defrox.bcrypt.BCryptPasswordEncoder
cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
Also we have this and works fine.
cas.authn.attributeRepository.jdbc[0].singleRow=true
cas.authn.attributeRepository.jdbc[0].url=jdbc:mysql://example/cas_server_db
cas.authn.attributeRepository.jdbc[0].sql=SELECT * FROM attributes WHERE {0}
cas.authn.attributeRepository.jdbc[0].requireAllAttributes=true
cas.authn.attributeRepository.jdbc[0].username=email
cas.authn.attributeRepository.jdbc[0].driverClass=com.mysql.jdbc.Driver
cas.authn.attributeRepository.jdbc[0].user=exampleUser
cas.authn.attributeRepository.jdbc[0].password=examplePass
cas.authn.attributeRepository.jdbc[0].dialect=org.hibernate.dialect.MySQLDialect
Our db schema is:
[image: Inline image 1]
Our problem is that we want perform the query with users.id =
attributes.user_id.
Is this possible and how we have to change the properties configuration to
achieve this?
Note that we have already asked on gitter chat and we have informed that
this is possible only by overriding the default person directory’s
aggregator/cascading functionality.
If this is the only way, how we can achieve that as we use the cas overlay
template master and where is the default one?
Thanks in advance.
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/5ceeb70a-7690-4919-9ee0-c477140ae6ea%40apereo.org.