Sha256: 8d4e4bd0c4c6b8637ce49c3ca8a323de38be96689d4eb4212693d82bbdb714ee
Contents?: true
Size: 798 Bytes
Versions: 14
Compression:
Stored size: 798 Bytes
Contents
module DiscourseApi module API module SSO def sync_sso(params={}) sso = DiscourseApi::SingleSignOn.new sso.sso_secret = params[:sso_secret] sso.name = params[:name] sso.username = params[:username] sso.email = params[:email] sso.external_id = params[:external_id] sso.suppress_welcome_message = params[:suppress_welcome_message] === true sso.avatar_url = params[:avatar_url] sso.title = params[:title] sso.avatar_force_update = params[:avatar_force_update] === true params.keys.select{|key| key.to_s.start_with?("custom") }.each do |custom_key| sso.custom_fields[custom_key] = params[custom_key] end post("/admin/users/sync_sso", sso.payload) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems