mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Fix case clause error regarding admin_generated password (#3122)
This commit is contained in:
parent
4b3a1ec614
commit
c396271c00
@ -137,7 +137,8 @@ oauth_issue_token(Jid, TTLSeconds, ScopesString) ->
|
||||
Scopes = [list_to_binary(Scope) || Scope <- string:tokens(ScopesString, ";")],
|
||||
try jid:decode(list_to_binary(Jid)) of
|
||||
#jid{luser =Username, lserver = Server} ->
|
||||
case oauth2:authorize_password({Username, Server}, Scopes, admin_generated) of
|
||||
Ctx1 = #oauth_ctx{password = admin_generated},
|
||||
case oauth2:authorize_password({Username, Server}, Scopes, Ctx1) of
|
||||
{ok, {_Ctx,Authorization}} ->
|
||||
{ok, {_AppCtx2, Response}} = oauth2:issue_token(Authorization, [{expiry_time, TTLSeconds}]),
|
||||
{ok, AccessToken} = oauth2_response:access_token(Response),
|
||||
|
Loading…
Reference in New Issue
Block a user