Mercurial > prosody-modules
comparison mod_http_oauth2/mod_http_oauth2.lua @ 5205:b6f41f0b5f58
mod_http_oauth2: Specify host for which to retrieve list of roles
Fixes core/usermanager.lua:299: attempt to index a nil value (field '?')
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 Mar 2023 23:36:13 +0100 |
parents | eb8b3a068ecc |
children | 31c62df82aa8 |
comparison
equal
deleted
inserted
replaced
5204:eb8b3a068ecc | 5205:b6f41f0b5f58 |
---|---|
476 issuer = module:http_url(nil, "/"):gsub("/$", ""); | 476 issuer = module:http_url(nil, "/"):gsub("/$", ""); |
477 authorization_endpoint = handle_authorization_request and module:http_url() .. "/authorize" or nil; | 477 authorization_endpoint = handle_authorization_request and module:http_url() .. "/authorize" or nil; |
478 token_endpoint = handle_token_grant and module:http_url() .. "/token" or nil; | 478 token_endpoint = handle_token_grant and module:http_url() .. "/token" or nil; |
479 jwks_uri = nil; -- TODO? | 479 jwks_uri = nil; -- TODO? |
480 registration_endpoint = handle_register_request and module:http_url() .. "/register" or nil; | 480 registration_endpoint = handle_register_request and module:http_url() .. "/register" or nil; |
481 scopes_supported = usermanager.get_all_roles and array(it.keys(usermanager.get_all_roles())) | 481 scopes_supported = usermanager.get_all_roles and array(it.keys(usermanager.get_all_roles(module.host))) |
482 or { "prosody:restricted"; "prosody:user"; "prosody:admin"; "prosody:operator" }; | 482 or { "prosody:restricted"; "prosody:user"; "prosody:admin"; "prosody:operator" }; |
483 response_types_supported = array(it.keys(response_type_handlers)); | 483 response_types_supported = array(it.keys(response_type_handlers)); |
484 authorization_response_iss_parameter_supported = true; | 484 authorization_response_iss_parameter_supported = true; |
485 }; | 485 }; |
486 }; | 486 }; |