25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

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

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) ->