Mercurial > prosody-modules
view mod_block_subscriptions/mod_block_subscriptions.lua @ 5221:22483cfce3ce
mod_http_oauth2: Reflect ALL attributes of the client registration
Per RFC 7591:
"
Additionally, the authorization server MUST return all registered
metadata about this client, including any fields provisioned by the
authorization server itself.
"
The idea is that the server may replace/drop fields in the registration, so
what gets reflected back to the client is the source of truth about the
registration.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 07 Mar 2023 14:52:43 +0000 |
parents | 107eb83aa732 |
children |
line wrap: on
line source
local allowed_presence_types = { probe = true, unavailable = true }; function filter_presence(event) local stanza = event.stanza; local presence_type = stanza.attr.type; if presence_type == nil or allowed_presence_types[presence_type] then return; end return true; -- Drop end module:hook("pre-presence/bare", filter_presence, 200); -- Client sending module:hook("presence/bare", filter_presence, 200); -- Client receiving