From 156fbb0c02affd05bc09708e4c9407e18ca66f16 Mon Sep 17 00:00:00 2001 From: En Rong <53928333+chownces@users.noreply.github.com> Date: Sun, 30 Oct 2022 03:59:29 +0800 Subject: [PATCH] printing out cas user information returned from /serviceValidate --- lib/cadet/auth/providers/cas.ex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cadet/auth/providers/cas.ex b/lib/cadet/auth/providers/cas.ex index b47756b6e..d1ae9d886 100644 --- a/lib/cadet/auth/providers/cas.ex +++ b/lib/cadet/auth/providers/cas.ex @@ -20,11 +20,11 @@ defmodule Cadet.Auth.Providers.CAS do } with {:validate, {:ok, %{body: body, status_code: 200}}} <- - {:validate, HTTPoison.get(config.service_validate_endpoint, [], params: params)}, - {:validation_response, data} <- {:validation_response, Jason.decode!(body)}, - {:extract_username, %{"name" => username}} <- {:extract_username, data} do - IO.inspect(data) - {:ok, %{token: data, username: username}} + {:validate, HTTPoison.get(config.service_validate_endpoint, [], params: params)} do + # {:validation_response, data} <- {:validation_response, Jason.decode!(body)}, + # {:extract_username, %{"name" => username}} <- {:extract_username, data} do + IO.inspect(body) + {:ok, %{token: body, username: "placeholder"}} else {:validate, {:ok, %{body: body, status_code: status}}} -> {:error, :upstream, "Status code #{status} from CAS: #{body}"}