Software /
code /
prosody-modules
Comparison
mod_http_oauth2/mod_http_oauth2.lua @ 6239:a931a95e363e
mod_http_oauth2: Pass client to token to enable introspection
author | magicfelix <felix@felix-zauberer.de> |
---|---|
date | Sat, 19 Apr 2025 18:30:57 +0200 |
parent | 6238:c1b94dd6e53b |
child | 6240:ab14e7ecb82f |
comparison
equal
deleted
inserted
replaced
6238:c1b94dd6e53b | 6239:a931a95e363e |
---|---|
426 return oauth_error("invalid_grant", "incorrect credentials"); | 426 return oauth_error("invalid_grant", "incorrect credentials"); |
427 end | 427 end |
428 | 428 |
429 local granted_jid = jid.join(request_username, module.host); | 429 local granted_jid = jid.join(request_username, module.host); |
430 local granted_scopes, granted_role = filter_scopes(request_username, params.scope); | 430 local granted_scopes, granted_role = filter_scopes(request_username, params.scope); |
431 return json.encode(new_access_token(granted_jid, granted_role, granted_scopes, nil)); | 431 return json.encode(new_access_token(granted_jid, granted_role, granted_scopes, client)); |
432 end | 432 end |
433 | 433 |
434 function response_type_handlers.code(client, params, granted_jid, id_token) | 434 function response_type_handlers.code(client, params, granted_jid, id_token) |
435 local request_username, request_host = jid.split(granted_jid); | 435 local request_username, request_host = jid.split(granted_jid); |
436 if not request_host or request_host ~= module.host then | 436 if not request_host or request_host ~= module.host then |