Comments (6)
To debug this, we need some more information. Please paste your configuration (cas.yml
and database.yml
) and as well how you created the database entries.
from casinoapp.
Thank's for answer. My * .yml was copied from your examples and updated as follow:
I've manually created the "casinousers" database on mysql, and used sql statement to create the users table and sql insert for values, the same I've done for rubycas-server.
cas.yml:
production:
frontend:
sso_name: 'CASino'
footer_text: 'Powered by <a href="http://rbcas.com/">CASino</a>'
authenticators:
########################################
# LDAP
########################################
# my_company_ldap:
# authenticator: 'LDAP'
# options:
# host: 'localhost'
# port: 636
# base: 'ou=people,dc=example,dc=com'
# username_attribute: 'uid'
# encryption: 'simple_tls'
# extra_attributes:
# email: 'mail'
# fullname: 'displayname'
########################################
# SQL (ActiveRecord authenticator)
########################################
my_funny_sql_database:
authenticator: "ActiveRecord"
options:
connection:
adapter: "mysql2"
host: "localhost"
username: "root"
password: "giorgio"
database: "casinousers"
table: "users"
username_column: "username"
password_column: "password"
extra_attributes:
email: "email"
fullname: "fullname"
the database.yml:
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: CASinoApp
pool: 5
username: root
password: giorgio
socket: /var/run/mysqld/mysqld.sock
and my users table is:
mysql> desc users;
+----------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+----------------+
| idusers | int(11) | NO | PRI | NULL | auto_increment |
| username | varchar(45) | YES | | NULL | |
| password | varchar(45) | YES | | NULL | |
| email | varchar(45) | YES | | NULL | |
| fullname | varchar(45) | YES | | NULL | |
| level | int(11) | YES | | NULL | |
+----------+-------------+------+-----+---------+----------------+
6 rows in set (0.03 sec)
PS i put a minus - before # to avoid automatic bold chars
from casinoapp.
I allowed myself to edit your comment. You can use three ` to create code blocks.
This looks good so far. How does such a table row out of users
look like?
The password has to be hashed with a salt. You can create a password hash with salt for the password pw123 like this:
bundle exec ruby -rbcrypt -e 'puts BCrypt::Password.create("pw123")'
from casinoapp.
Thank' for help!
I've not understand that passwords need to be hashed. I've inserted plain text pwd on the users table.
Now i've updated the password field length, i've updated the field with the string of your command BCrypt.. and now i can login !!
In the example for rubycas-server there is a reference if need hashed pwds, so i thought that in casinoapp the pwd was plain text since i did not find any different indication.
Last thing: mysql have a function for coding a text to insert into password field so i can use sql insert statement or i need a extra app for users management?
thank's
from casinoapp.
That's good to hear!
As cleartext passwords are really insecure, we just don't support them. I don't know any function to create hashed and salted passwords with MySQL only. Postgresql has support for this: http://www.postgresql.org/docs/8.3/static/pgcrypto.html .
The user management is not part of CASinoApp, so you maybe want to generate the hash with the command above and use it in you sql-statement.
from casinoapp.
hi,
I have problem in login with users which i created in casino_users using mysql2 database. My cas.yml file is:
defaults: &defaults
login_ticket:
lifetime: 600
service_ticket:
lifetime_unconsumed: 300
lifetime_consumed: 86400
proxy_ticket:
lifetime_unconsumed: 300
lifetime_consumed: 86400
frontend:
sso_name: "CASino"
footer_text: "Powered by <a href="http://rbcas.com/\">CASino"
development:
<<: *defaults
authenticators:
my_company_sql_database:
authenticator: "ActiveRecord"
options:
connection:
adapter: "mysql2"
host: "localhost"
username: "root"
password: "maheshwari"
database: "CASinoApp"
table: "casino_users"
username_column: "username"
password_column: "password"
extra_attributes:
email: "email_database_column"
fullname: "displayname_database_column"
test:
<<: *defaults
authenticators:
static:
class: "CASino::StaticAuthenticator"
options:
users:
testuser:
password: "foobar123"
production:
<<: *defaults
authenticators:
my_company_ldap:
authenticator: "LDAP"
options:
host: "localhost"
port: 12445
base: "dc=users,dc=example.com"
username_attribute: "uid"
encryption: "simple_tls"
extra_attributes:
email: "mail
and my database.yml is:
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: CASinoApp
pool: 5
username: root
password: maheshwari
socket: /var/run/mysqld/mysqld.sock
casino_users table:
+----+---------------+----------+-------------------------------------------------------------+---------------------+---------------------+
| id | authenticator | username | extra_attributes | created_at | updated_at |
+----+---------------+----------+-------------------------------------------------------------+---------------------+---------------------+
| 1 | vijay | vijay | NULL | NULL | NULL |
| 2 | static | testuser | --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
| 2015-06-29 10:42:36 | 2015-06-29 12:43:32 |
| 3 | vijay1 | vijay123 | --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess | 2015-06-30 10:42:36 | 2015-06-29 12:46:32 |
| 4 | vijay2 | vijay123 | --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess {} | 2015-06-30 10:42:36 | 2015-06-29 12:46:32 |
+----+---------------+----------+-------------------------------------------------------------+---------------------+---------------------+
from casinoapp.
Related Issues (20)
- Create adaptor for Google login HOT 4
- Incorrect name for cleanup:all task HOT 1
- Use sidekiq instead of cron. HOT 2
- rotp 1.7.0 out of date HOT 1
- Improve the wiki HOT 2
- User log in with Casino HOT 10
- How to fix this problem .. please help me HOT 1
- Running CASino via Passenger using relative paths HOT 3
- Hosting Casino Server App HOT 3
- Error Active Directory Authentication HOT 1
- cant login with users in casino app HOT 1
- different tables for username and password HOT 2
- unable to login to users in postgres database with encryted password HOT 2
- unable to login to CASinoApp using external database username and password. HOT 1
- translation missing: fr.time.formats.default
- Cannot log in to CASinoApp HOT 1
- How do I get the current user session in the application when login with casino Gem?
- Missing last migrations from CASino gem HOT 4
- Trying to install CASinoApp. Getting bundle exec rake errors. HOT 2
- Docker container
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from casinoapp.