mod_auth_oauth_external/mod_auth_oauth_external.lua
changeset 5350 d9bc8712a745
parent 5349 3390bb2f9f6c
child 5437 b40299bbdf14
--- a/mod_auth_oauth_external/mod_auth_oauth_external.lua	Thu Mar 16 12:45:52 2023 +0100
+++ b/mod_auth_oauth_external/mod_auth_oauth_external.lua	Thu Mar 16 13:04:13 2023 +0100
@@ -3,8 +3,9 @@
 local json = require "util.json";
 local sasl = require "util.sasl";
 
--- TODO -- local issuer_identity = module:get_option_string("oauth_external_issuer");
-local oidc_discovery_url = module:get_option_string("oauth_external_discovery_url")
+local issuer_identity = module:get_option_string("oauth_external_issuer");
+local oidc_discovery_url = module:get_option_string("oauth_external_discovery_url",
+	issuer_identity and issuer_identity .. "/.well-known/oauth-authorization-server" or nil);
 local validation_endpoint = module:get_option_string("oauth_external_validation_endpoint");
 local token_endpoint = module:get_option_string("oauth_external_token_endpoint");