Last active
March 28, 2017 16:54
-
-
Save abid-hussain/8720578 to your computer and use it in GitHub Desktop.
Base64 json encoding and SSO / Single Sign On integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forumb_secret_key = "f5259ae089f1030b335cf1ef8166d568" | |
#//if your subdomain at some forum eg forumbee is like abc.forumbee.com then your "domain" => "abc" | |
params = { "domain" => "abc", | |
"uri" => "/sso/1/login", | |
"date" => (Time.now.utc.to_i*1000).to_s, | |
"email" => email, | |
"name" => name, | |
"key" => email | |
} | |
data_in_base64 = Base64.encode64(params.to_json).gsub(/\n/, '') | |
digest = Digest::SHA1.hexdigest forumb_secret_key+data_in_base64 | |
"https://abc.forumbee.com/sso/1/login?digest=#{digest}&data=#{data_in_base64}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, once I change values to reflect my forumbee account, where exactly do i put this file, and where do I put the link for logged in users (wordpress) so this will work? Thank you!