comparison mod_http_oauth2/mod_http_oauth2.lua @ 5858:761142ee0ff2

mod_http_oauth2: Reflect changes to defaults etc - Resource owner password grant was disabled by default - Tokens now include a hash of client_id making it possible to be reasonable sure that they were issued to a particular client
author Kim Alvefur <zash@zash.se>
date Tue, 05 Mar 2024 00:32:00 +0100
parents b109773ce6fe
children ca3479c67e48
comparison
equal deleted inserted replaced
5857:ff90dad75352 5858:761142ee0ff2
1126 1126
1127 return { 1127 return {
1128 headers = { content_type = "application/json" }; 1128 headers = { content_type = "application/json" };
1129 body = json.encode { 1129 body = json.encode {
1130 active = true; 1130 active = true;
1131 client_id = credentials.username; -- We don't really know for sure 1131 client_id = credentials.username; -- Verified via client hash
1132 username = jid.node(token_info.jid); 1132 username = jid.node(token_info.jid);
1133 scope = token_info.grant.data.oauth2_scopes; 1133 scope = token_info.grant.data.oauth2_scopes;
1134 token_type = purpose_map[token_info.purpose]; 1134 token_type = purpose_map[token_info.purpose];
1135 exp = token.expires; 1135 exp = token.expires;
1136 iat = token.created; 1136 iat = token.created;