changeset 6526:1216f6befbe7

mod_auth_oauth_external: Raise error when configured without at least one endpoint Module does not work if both are unset.
author Kim Alvefur <zash@zash.se>
date Sat, 02 May 2026 16:13:35 +0200
parents 05d66fe6b289
children 6f2f21b00233
files mod_auth_oauth_external/mod_auth_oauth_external.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auth_oauth_external/mod_auth_oauth_external.lua	Sat May 02 16:10:48 2026 +0200
+++ b/mod_auth_oauth_external/mod_auth_oauth_external.lua	Sat May 02 16:13:35 2026 +0200
@@ -32,6 +32,9 @@
 }
 --]]
 
+assert(validation_endpoint or token_endpoint,
+	"One or both of 'oauth_external_validation_endpoint' and 'oauth_external_token_endpoint' must be configured");
+
 local accounts = module:open_store("accounts");
 
 local host = module.host;