|
|
|
@@ -332,10 +332,10 @@ class UsersController < ApplicationController |
|
|
|
|
|
|
|
def sso_login |
|
|
|
if params[:login].present? && !current_user.logged? && params[:websiteName].present? |
|
|
|
params = { "login" => "#{params[:login]}", "private_token" => "hriEn3UwXfJs3PmyXnSH" } |
|
|
|
api_url= "https://pre-data.educoder.net" |
|
|
|
req_params = { "login" => "#{params[:login]}", "private_token" => "hriEn3UwXfJs3PmyXnSH" } |
|
|
|
api_url= "https://data.educoder.net" |
|
|
|
client = Faraday.new(url: api_url) |
|
|
|
response = client.public_send("get", "/api/sources/get_user_info_by_login", params) |
|
|
|
response = client.public_send("get", "/api/sources/get_user_info_by_login", req_params) |
|
|
|
result = JSON.parse(response.body) |
|
|
|
|
|
|
|
if result["status"].to_s == "0" |
|
|
|
|