SSO Ruby code fails

Avatar
  • updated
  • Fixed
The SSO Ruby code sample fails in my environment.  Using the sample script accessible via the Ruby link on Ruby 1.9.3 yields the following:

irb(main):028:0* 16.times { |i| message_json[i] ^= iv[i] }
NoMethodError: undefined method `^' for "{":String
from (irb):28:in `block in irb_binding'
from (irb):28:in `times'
from (irb):28
Pinned replies
Avatar
Sergey Stukov co-founder
  • Answer
  • Fixed
We added support for ruby 1.9.+ now.

replace 
16.times { |i| message_json[i] ^= iv[i] }
with
16.times { |i| message_json[i] = (message_json[i].ord ^ iv[i].ord).chr }
and all should work
Avatar
toby
Quote from Sergey Stukov
Sorry for inconvenience we updated ruby example on site.
cheers!
Avatar
Sergey Stukov co-founder
Quote from toby
Could you update the docs with the suggestions from this bug, I spent a few hours trying to get it to work before I found this.
Sorry for inconvenience we updated ruby example on site.
Avatar
toby
Could you update the docs with the suggestions from this bug, I spent a few hours trying to get it to work before I found this.
Avatar
jrimmer
Quote from Vladimir Mullagaliyev
We linked your accounts. Please logout and login again.
Looks good, thanks.
Avatar
Vladimir Mullagaliyev co-founder
Quote from jrimmer
old -> new
jrimmer@mirthworks.com -> jrimmer
mhansen@mirthworks.com -> mhansen

We linked your accounts. Please logout and login again.
Avatar
jrimmer
Quote from Sergey Stukov
Give us the new ones and we link/merge it with old logins.
old -> new
jrimmer@mirthworks.com -> jrimmer
mhansen@mirthworks.com -> mhansen

Avatar
Sergey Stukov co-founder
Quote from jrimmer
SSO works great but now it's not clear how to login as admins.  Our Userecho accounts know us as admins of Mirthworks but our SSO accounts do not.  Do you need to swap them out or something?
Give us the new ones and we link/merge it with old logins.
Avatar
jrimmer
Quote from Sergey Stukov
We fixed issue and now you support community works on http://feedback.mirthworks.com/


Also now when users click sign-in on the UserEcho side it will redirect user to the your authorization url.

SSO works great but now it's not clear how to login as admins.  Our Userecho accounts know us as admins of Mirthworks but our SSO accounts do not.  Do you need to swap them out or something?
Avatar
jrimmer
Quote from Sergey Stukov
We fixed issue and now you support community works on http://feedback.mirthworks.com/


Also now when users click sign-in on the UserEcho side it will redirect user to the your authorization url.

Great, I'll test and report back.
Avatar
Sergey Stukov co-founder
Quote from miketest1
Sorted it out.  It appears your SSO functionality is incompatible with your domain aliasing feature.  If I remove domain aliasing and change the 'host:' line in the javascript to refer to the '<site>.userecho.com' name instead SSO works as expected.

I also don't understand the point of adding the login URLs and whatnot to the SSO page as it suggests that doing so will redirect logins to the provided URL but I haven't found that to be the case.  Even with my site SSO'd if I'm logged out and navigate straight to my (non domain-aliased) Userecho site and click login the Userecho login pops up rather than redirecting to the login URL I provided on the SSO page.

We fixed issue and now you support community works on http://feedback.mirthworks.com/


Also now when users click sign-in on the UserEcho side it will redirect user to the your authorization url.