# HG changeset patch # User Kim Alvefur # Date 1685997164 -7200 # Node ID 83ebfc367169c45ea23933ca8cbf4c3e395b24bd # Parent d87d0e4a8516f84f39681bee57a7d18ee52ad8ea mod_http_oauth2: Return Authentication Time per OpenID Core Section 2 Mandatory To Implement, either MUST include or OPTIONAL depending on things we don't look at, so might as well include it all the time. Since we do not persist authentication state with cookies or such, the authentication time will always be some point between the user being sent to the authorization endpoint and the time they are sent back to the client application. diff -r d87d0e4a8516 -r 83ebfc367169 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Mon Jun 05 22:19:17 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Mon Jun 05 22:32:44 2023 +0200 @@ -568,7 +568,7 @@ user = { username = username; host = module.host; - token = new_user_token({ username = username, host = module.host }); + token = new_user_token({ username = username; host = module.host; auth_time = os.time() }); }; }; elseif form.user_token and form.consent then @@ -832,6 +832,7 @@ iss = get_issuer(); sub = url.build({ scheme = "xmpp"; path = user_jid }); aud = params.client_id; + auth_time = auth_state.user.auth_time; nonce = params.nonce; }); local response_type = params.response_type;