Mercurial > prosody-modules
diff mod_http_oauth2/mod_http_oauth2.lua @ 5335:53c6f49dcbb8
mod_http_oauth2: Correct error code when missing credentials for userinfo
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 10 Apr 2023 10:44:23 +0200 |
parents | eb482defd9b0 |
children | 77ac04bd2f65 |
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua Sat Apr 08 19:51:24 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Mon Apr 10 10:44:23 2023 +0200 @@ -750,7 +750,7 @@ local request = event.request; local credentials = get_request_credentials(request); if not credentials or not credentials.bearer_token then - return 400; + return 401; end local token_info = tokens.get_token_info(credentials.bearer_token); if not token_info then