aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl/oauthbearer.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-03-15 09:41:38 +0000
committerMatthew Wild <mwild1@gmail.com>2023-03-15 09:41:38 +0000
commit9dedc78f3c9c8b4587dfa8ff014c521fe6cb1d2c (patch)
treeb0779126d3e20bd70adce3edb314b120d00d6c38 /util/sasl/oauthbearer.lua
parentadb37b82724d0f1fa8e236f03e592506a9777d78 (diff)
downloadprosody-9dedc78f3c9c8b4587dfa8ff014c521fe6cb1d2c.tar.gz
prosody-9dedc78f3c9c8b4587dfa8ff014c521fe6cb1d2c.zip
util.sasl.oauthbearer: Attach token_info to sasl handler
This allows token-aware things to access extra information about the authentication, such as when the token is due to expire and the attached custom 'data'.
Diffstat (limited to 'util/sasl/oauthbearer.lua')
-rw-r--r--util/sasl/oauthbearer.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/sasl/oauthbearer.lua b/util/sasl/oauthbearer.lua
index 54c63575..5cce2ef7 100644
--- a/util/sasl/oauthbearer.lua
+++ b/util/sasl/oauthbearer.lua
@@ -75,6 +75,8 @@ local function oauthbearer(self, message)
self.resource = token_info.resource;
self.role = token_info.role;
+ self.token_info token_info;
+
return "success";
end