Comparison

mod_http_oauth2/mod_http_oauth2.lua @ 5358:0905d348bd34

mod_http_oauth2: Include additional OpenID scopes in metadata Drops fallback because this module probably doesn't work with Prosody before the role stuff anyway.
author Kim Alvefur <zash@zash.se>
date Sat, 22 Apr 2023 14:22:56 +0200
parent 5357:eda3b078ba2c
child 5359:230fc6a0c086
comparison
equal deleted inserted replaced
5357:eda3b078ba2c 5358:0905d348bd34
867 issuer = get_issuer(); 867 issuer = get_issuer();
868 authorization_endpoint = handle_authorization_request and module:http_url() .. "/authorize" or nil; 868 authorization_endpoint = handle_authorization_request and module:http_url() .. "/authorize" or nil;
869 token_endpoint = handle_token_grant and module:http_url() .. "/token" or nil; 869 token_endpoint = handle_token_grant and module:http_url() .. "/token" or nil;
870 jwks_uri = nil; -- TODO? 870 jwks_uri = nil; -- TODO?
871 registration_endpoint = handle_register_request and module:http_url() .. "/register" or nil; 871 registration_endpoint = handle_register_request and module:http_url() .. "/register" or nil;
872 scopes_supported = usermanager.get_all_roles and array(it.keys(usermanager.get_all_roles(module.host))):push("openid") 872 scopes_supported = usermanager.get_all_roles and array(it.keys(usermanager.get_all_roles(module.host))):append(array(openid_claims:items()));
873 or { "prosody:restricted"; "prosody:user"; "prosody:admin"; "prosody:operator"; "openid" };
874 response_types_supported = array(it.keys(response_type_handlers)); 873 response_types_supported = array(it.keys(response_type_handlers));
875 authorization_response_iss_parameter_supported = true; 874 authorization_response_iss_parameter_supported = true;
876 875
877 -- OpenID 876 -- OpenID
878 userinfo_endpoint = handle_register_request and module:http_url() .. "/userinfo" or nil; 877 userinfo_endpoint = handle_register_request and module:http_url() .. "/userinfo" or nil;