# HG changeset patch # User Kim Alvefur # Date 1681116471 -7200 # Node ID 77ac04bd2f65bbce89b263a75e2b7e3c28bee70e # Parent 53c6f49dcbb8b0854af6b9bbc51b5051800ddcfb mod_http_oauth2: Add some debug logging for UserInfo endpoint diff -r 53c6f49dcbb8 -r 77ac04bd2f65 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Mon Apr 10 10:44:23 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Mon Apr 10 10:47:51 2023 +0200 @@ -750,10 +750,12 @@ local request = event.request; local credentials = get_request_credentials(request); if not credentials or not credentials.bearer_token then + module:log("debug", "Missing credentials for UserInfo endpoint: %q", credentials) return 401; end - local token_info = tokens.get_token_info(credentials.bearer_token); + local token_info,err = tokens.get_token_info(credentials.bearer_token); if not token_info then + module:log("debug", "UserInfo query failed token validation: %s", err) return 403; end -- TODO check that they actually have access to the userinfo endpoint, aka