Mercurial > prosody-modules
comparison mod_http_oauth2/mod_http_oauth2.lua @ 5204:eb8b3a068ecc
mod_http_oauth2: Return list of active roles in discovery
Relies on Prosody trunk rev cdb996637b08
Better than a hardcoded list
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 04 Mar 2023 21:36:00 +0100 |
| parents | c60cff787d6a |
| children | b6f41f0b5f58 |
comparison
equal
deleted
inserted
replaced
| 5203:c60cff787d6a | 5204:eb8b3a068ecc |
|---|---|
| 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 = { "prosody:restricted"; "prosody:user"; "prosody:admin"; "prosody:operator" }; | 481 scopes_supported = usermanager.get_all_roles and array(it.keys(usermanager.get_all_roles())) |
| 482 or { "prosody:restricted"; "prosody:user"; "prosody:admin"; "prosody:operator" }; | |
| 482 response_types_supported = array(it.keys(response_type_handlers)); | 483 response_types_supported = array(it.keys(response_type_handlers)); |
| 483 authorization_response_iss_parameter_supported = true; | 484 authorization_response_iss_parameter_supported = true; |
| 484 }; | 485 }; |
| 485 }; | 486 }; |
| 486 }; | 487 }; |
