rbCAS / CASino

CASino is a Ruby-based Single Sign-On solution supporting the CAS standard
MIT License
329 stars 189 forks source link

unable to authenticate #149

Closed gerwa closed 8 years ago

gerwa commented 8 years ago

UPDATE: is working now, last migration was not included when I used the CASinoApp for install, added this and all works fine. thanks!

everything seems to work fine until CASino::TwoFactorAuthenticator Load is running, then I get a rollback and this error message: NameError in CASino::SessionsController#create undefined local variable or method `user_ip=' for #CASino::TicketGrantingTicket:0x963eea4 any hint what is going wrong? Thank you!

NameError (undefined local variable or method user_ip=' for #<CASino::TicketGrantingTicket:0x963eea4>): activemodel (4.1.8) lib/active_model/attribute_methods.rb:435:inmethod_missing' activerecord (4.1.8) lib/active_record/attribute_methods.rb:213:in method_missing' activerecord (4.1.8) lib/active_record/attribute_assignment.rb:45:inpublic_send' activerecord (4.1.8) lib/active_record/attribute_assignment.rb:45:in _assign_attribute' activerecord (4.1.8) lib/active_record/attribute_assignment.rb:32:inblock in assign_attributes' activerecord (4.1.8) lib/active_record/attribute_assignment.rb:26:in each' activerecord (4.1.8) lib/active_record/attribute_assignment.rb:26:inassign_attributes' activerecord (4.1.8) lib/active_record/core.rb:453:in init_attributes' activerecord (4.1.8) lib/active_record/core.rb:196:ininitialize' activerecord (4.1.8) lib/active_record/inheritance.rb:30:in new' activerecord (4.1.8) lib/active_record/inheritance.rb:30:innew' activerecord (4.1.8) lib/active_record/reflection.rb:239:in build_association' activerecord (4.1.8) lib/active_record/associations/association.rb:247:inbuild_record' activerecord (4.1.8) lib/active_record/associations/collection_association.rb:460:in block in _create_record' activerecord (4.1.8) lib/active_record/associations/collection_association.rb:168:inblock in transaction' activerecord (4.1.8) lib/active_record/connection_adapters/abstract/database_statements.rb:201:in block in transaction' activerecord (4.1.8) lib/active_record/connection_adapters/abstract/database_statements.rb:209:inwithin_new_transaction' activerecord (4.1.8) lib/active_record/connection_adapters/abstract/database_statements.rb:201:in transaction' activerecord (4.1.8) lib/active_record/transactions.rb:208:intransaction' activerecord (4.1.8) lib/active_record/associations/collection_association.rb:167:in transaction' activerecord (4.1.8) lib/active_record/associations/collection_association.rb:459:in_create_record' activerecord (4.1.8) lib/active_record/associations/collection_association.rb:141:in create!' activerecord (4.1.8) lib/active_record/associations/collection_proxy.rb:301:increate!' casino (4.0.3) app/processors/casino/ticket_granting_ticket_processor.rb:32:in acquire_ticket_granting_ticket' casino (4.0.3) app/helpers/casino/sessions_helper.rb:35:insign_in' casino (4.0.3) app/controllers/casino/sessions_controller.rb:27:in create' actionpack (4.1.8) lib/action_controller/metal/implicit_render.rb:4:insend_action' actionpack (4.1.8) lib/abstract_controller/base.rb:189:in process_action' actionpack (4.1.8) lib/action_controller/metal/rendering.rb:10:inprocess_action' ... and so on

1nsan commented 8 years ago

Hi @gerwa,

I have the same error but I'm not sure to understand how you fixed it. Could you explain a bit more for a noob ? :panda_face:

Thanks

gerwa commented 8 years ago

The CasinoApp for install is not complete, when you use this you have to add the last migration manually, you find it here: https://github.com/rbCAS/CASino/blob/master/db/migrate/20151022192752_add_user_ip_to_ticket_granting_ticket.rb, then rake db:migrate and all is working fine. hope it helps, regards

1nsan commented 8 years ago

Oh damn, thanks a lot !