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
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
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
Give us the new ones and we link/merge it with old logins.
old -> new
jrimmer@mirthworks.com -> jrimmer
mhansen@mirthworks.com -> mhansen

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 Vladimir Mullagaliyev
We linked your accounts. Please logout and login again.
Looks good, thanks.
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
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
Quote from Sergey Stukov
Sorry for inconvenience we updated ruby example on site.
cheers!