jbbarth / redmine_omniauth_cas

CAS authentication plugin for Redmine through OmniAuth
MIT License
20 stars 14 forks source link

Login callback error #2

Closed imorales closed 11 years ago

imorales commented 12 years ago

Hi,

I configured the plugin with our CAS central server, but when we login in the CAS, the login is OK and the redirects to redmine and an error occurs.

NoMethodError (undefined method +' for nil:NilClass): /usr/lib/ruby/1.8/net/http.rb:1118:inaddr_port' /usr/lib/ruby/1.8/net/http.rb:1078:in begin_transport' /usr/lib/ruby/1.8/net/http.rb:1048:inrequest' /usr/lib/ruby/1.8/net/http.rb:772:in get' omniauth-cas (1.0.0) lib/omniauth/strategies/cas/service_ticket_validator.rb:86:inget_service_response_body' /usr/lib/ruby/1.8/net/http.rb:543:in start' omniauth-cas (1.0.0) lib/omniauth/strategies/cas/service_ticket_validator.rb:85:inget_service_response_body' omniauth-cas (1.0.0) lib/omniauth/strategies/cas/service_ticket_validator.rb:32:in user_info' omniauth-cas (1.0.0) lib/omniauth/strategies/cas.rb:67:incallback_phase' omniauth (1.1.1) lib/omniauth/strategy.rb:219:in callback_call' omniauth (1.1.1) lib/omniauth/strategy.rb:175:incall!' omniauth (1.1.1) lib/omniauth/strategy.rb:157:in call' omniauth (1.1.1) lib/omniauth/builder.rb:48:incall' rack-openid (1.3.1) lib/rack/openid.rb:98:in call' actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:incall' rack (1.4.1) lib/rack/etag.rb:23:in call' rack (1.4.1) lib/rack/conditionalget.rb:25:incall' actionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in call' actionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:incall' actionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:in call' rack (1.4.1) lib/rack/session/abstract/id.rb:205:incontext' rack (1.4.1) lib/rack/session/abstract/id.rb:200:in call' actionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:incall' activerecord (3.2.8) lib/active_record/query_cache.rb:64:in call' activerecord (3.2.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:incall' actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in call' activesupport (3.2.8) lib/active_support/callbacks.rb:405:in_run866538101call4callbacks' activesupport (3.2.8) lib/active_support/callbacks.rb:405:in send' activesupport (3.2.8) lib/active_support/callbacks.rb:405:in__run_callback' activesupport (3.2.8) lib/active_support/callbacks.rb:385:in _run_call_callbacks' activesupport (3.2.8) lib/active_support/callbacks.rb:81:insend' activesupport (3.2.8) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:incall' actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in call' actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:incall' actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in call' railties (3.2.8) lib/rails/rack/logger.rb:26:incall_app' railties (3.2.8) lib/rails/rack/logger.rb:16:in call' actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:incall' rack (1.4.1) lib/rack/methodoverride.rb:21:in call' rack (1.4.1) lib/rack/runtime.rb:17:incall' activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.4.1) lib/rack/lock.rb:15:incall' actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in call' rack-cache (1.2) lib/rack/cache/context.rb:136:inforward' rack-cache (1.2) lib/rack/cache/context.rb:245:in fetch' rack-cache (1.2) lib/rack/cache/context.rb:185:inlookup' rack-cache (1.2) lib/rack/cache/context.rb:66:in call!' rack-cache (1.2) lib/rack/cache/context.rb:51:incall' railties (3.2.8) lib/rails/engine.rb:479:in call' railties (3.2.8) lib/rails/application.rb:223:incall' rack (1.4.1) lib/rack/content_length.rb:14:in call' railties (3.2.8) lib/rails/rack/log_tailer.rb:17:incall' rack (1.4.1) lib/rack/handler/webrick.rb:59:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:ineach' /usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart' /usr/lib/ruby/1.8/webrick/server.rb:82:in start' rack (1.4.1) lib/rack/handler/webrick.rb:13:inrun' rack (1.4.1) lib/rack/server.rb:265:in start' railties (3.2.8) lib/rails/commands/server.rb:70:instart' railties (3.2.8) lib/rails/commands.rb:55 railties (3.2.8) lib/rails/commands.rb:50:in tap' railties (3.2.8) lib/rails/commands.rb:50 script/rails:6:inrequire' script/rails:6

In the stacktrace looks that there is a problem validating the cas ticket.

My enviroment is:

Ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux] Rails 3.2.8 RubyGems 1.8.24 Redmine 2.1.4 Jasig Central Authentication Service 3.5.1

Thanks.

jbbarth commented 11 years ago

There might be a problem with your configuration, can you confirm all fields are filled with the right values in the plugin configuration, with full, absolute urls ? The plugin should be smart enough to detect that though, so I'd be happy to fix it if you can give me your settings (you can obfuscate the host if they're private..)

imorales commented 11 years ago

Yes, was a problem with the CAS server.

jbbarth commented 11 years ago

Thanks for the feedback