Comparison

mod_http_oauth2/mod_http_oauth2.lua @ 5182:20ba6340f524

mod_http_oauth2: Issue tokens for the purpose of 'oauth2' This argument was added in Prosody trunk rev 012fa81d1f5d
author Kim Alvefur <zash@zash.se>
date Wed, 01 Mar 2023 21:55:34 +0100
parent 5181:2c6acf2d6fd4
child 5185:09d6bbd6c8a4
comparison
equal deleted inserted replaced
5181:2c6acf2d6fd4 5182:20ba6340f524
60 extra = { oauth2_response = { error = err_name, error_description = err_desc } }; 60 extra = { oauth2_response = { error = err_name, error_description = err_desc } };
61 }); 61 });
62 end 62 end
63 63
64 local function new_access_token(token_jid, scope, ttl) 64 local function new_access_token(token_jid, scope, ttl)
65 local token = tokens.create_jid_token(token_jid, token_jid, scope, ttl); 65 local token = tokens.create_jid_token(token_jid, token_jid, scope, ttl, nil, "oauth2");
66 return { 66 return {
67 token_type = "bearer"; 67 token_type = "bearer";
68 access_token = token; 68 access_token = token;
69 expires_in = ttl; 69 expires_in = ttl;
70 scope = scope; 70 scope = scope;