Software / code / prosody-modules
Annotate
mod_server_info/mod_server_info.lua @ 5853:b109773ce6fe
mod_http_oauth2: Reuse JWT issuance time as substitute for auth time
Makes the token shorter. Since iat and auth_time are generated at about
the same time they would only differ by a few microseconds anyway.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 24 Jan 2024 17:55:26 +0100 |
| parent | 5817:174c77da03f5 |
| child | 5866:ed82916e5796 |
| rev | line source |
|---|---|
|
5817
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 -- XEP-0128: Service Discovery Extensions (manual config) |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 -- |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 -- Copyright (C) 2023 Matthew Wild |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 -- |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 -- This project is MIT/X11 licensed. Please see the |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 -- COPYING file in the source package for more information. |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 -- |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 local dataforms = require "util.dataforms"; |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 local config = module:get_option("server_info"); |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 if not config or next(config) == nil then return; end -- Nothing to do |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 for _, form in ipairs(config) do |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 module:add_extension(dataforms.new(form):form({}, "result")); |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 end |
|
174c77da03f5
mod_server_info: New module to add custom service extension forms to disco
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 |