Sha256: 26b9f4fc6d58b2de6f53f9c1947d4d37f30b03e198b0d807d2682152785f4119
Contents?: true
Size: 763 Bytes
Versions: 21
Compression:
Stored size: 763 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.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
21 entries across 21 versions & 1 rubygems