I'm using rubycas-server GEM as my CAS server. This CAS server is checking user credentials from a user table of a different database. These users are created using Devise gem. Devise saves every user's password in encrypted form in database table. So in the configuration file of this rubycas-server contains a authenticator section, It's code is given below:
authenticator:
class: CASServer::Authenticators::SQL
database:
adapter: postgresql
database: testdb
username: postgres
password: root
host: localhost
pool: 5
user_table: users
username_column: email
password_column: encrypted_password
encrypt_function: <encryption function>
As stated above in the last line of code that, encrypted_function contains the algorithm to check credentials. Some samples given gelow in the URL
https://code.google.com/p/rubycas-server/wiki/UsingTheSQLEncryptedAuthenticator
But I can't find what will be suitable for devise. Please help.