Software /
code /
prosody
Comparison
util/sasl/anonymous.lua @ 12940:2aebd9bf02fc
util.sasl.oauthbearer: Adjust parsing of GS2 to allow lack of authzid
Partly copied from util.sasl.scram and then reduced a bit.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Mar 2023 13:45:49 +0100 |
parent | 8874:d6eb910a204d |
child | 12975:d10957394a3c |
comparison
equal
deleted
inserted
replaced
12939:bb6a98a7b0b4 | 12940:2aebd9bf02fc |
---|---|
31 | 31 |
32 local function anonymous(self, message) -- luacheck: ignore 212/message | 32 local function anonymous(self, message) -- luacheck: ignore 212/message |
33 local username; | 33 local username; |
34 repeat | 34 repeat |
35 username = generate_random_id():lower(); | 35 username = generate_random_id():lower(); |
36 until self.profile.anonymous(self, username, self.realm); | 36 self.username = username; |
37 self.username = username; | 37 until self.profile.anonymous(self, username, self.realm, message); |
38 return "success" | 38 return "success" |
39 end | 39 end |
40 | 40 |
41 local function init(registerMechanism) | 41 local function init(registerMechanism) |
42 registerMechanism("ANONYMOUS", {"anonymous"}, anonymous); | 42 registerMechanism("ANONYMOUS", {"anonymous"}, anonymous); |