Skip to content

Commit

Permalink
Make resource_owner validation more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
fatum authored and Sgiath committed Dec 19, 2023
1 parent 597c254 commit 7cc660b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ defmodule ExOauth2Provider.Authorization.Code do

defp validate_resource_owner({:ok, %{resource_owner: resource_owner} = params}) do
case resource_owner do
%{__struct__: _} -> {:ok, params}
record when is_map(record) -> {:ok, params}
_ -> Error.add_error({:ok, params}, Error.invalid_request())
end
end
Expand Down

0 comments on commit 7cc660b

Please sign in to comment.