Diff

mod_http_oauth2/mod_http_oauth2.lua @ 5340:cd195283127f

mod_http_oauth2: Fix table index error when using refresh token
author Kim Alvefur <zash@zash.se>
date Wed, 12 Apr 2023 11:22:36 +0200
parent 5337:8d8e85d6dc91
child 5341:dcb93ffe64ae
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Tue Apr 11 15:59:35 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Wed Apr 12 11:22:36 2023 +0200
@@ -366,7 +366,7 @@
 	refresh_token_info.token = params.refresh_token;
 
 	return json.encode(new_access_token(
-		refresh_token_info.jid, refresh_token_info.role, refresh_token_info.data.oauth2_scopes, client, nil, refresh_token_info
+		refresh_token_info.jid, refresh_token_info.role, refresh_token_info.grant.data.oauth2_scopes, client, nil, refresh_token_info
 	));
 end