Fix small bug introduced in 5d549dc

When providing a client-id as explained in
  https://www.process-one.net/blog/understanding-ejabberd-oauth-support-roadmap/
ejabberd crashed with an error
  exception error: no function clause matching
  ejabberd_oauth:get_client_identity(
as reported in
  https://stackoverflow.com/questions/76922951/ejabberd-oauth-api-http-1-1-502-bad-gateway
This commit is contained in:
Badlop 2023-08-18 18:04:02 +02:00
parent c0e7774937
commit a01de8d944
1 changed files with 1 additions and 2 deletions

View File

@ -244,10 +244,9 @@ terminate(_Reason, _State) ->
code_change(_OldVsn, State, _Extra) -> {ok, State}.
get_client_identity(<<"">>, Ctx) ->
{ok, {Ctx, {client, unknown_client}}};
get_client_identity({client, ClientID}, Ctx) ->
get_client_identity(ClientID, Ctx) when is_binary(ClientID) ->
{ok, {Ctx, {client, ClientID}}}.
verify_redirection_uri(_ClientID, RedirectURI, Ctx) ->