mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 10:39:29 +02:00
Fix case clause error regarding admin_generated password (#3122)
This commit is contained in:
parent
4b3a1ec614
commit
c396271c00
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue