Mercurial > prosody-modules
comparison mod_http_oauth2/mod_http_oauth2.lua @ 5393:9b9d612f9083
mod_http_oauth2: Add way to retrieve registration schema
Mostly for convenience and to fill the void otherwise and drive the
awkward fallback to 404 away.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 30 Apr 2023 16:58:53 +0200 |
parents | c0a6f39caf47 |
children | 434ee49b04de |
comparison
equal
deleted
inserted
replaced
5392:c0a6f39caf47 | 5393:9b9d612f9083 |
---|---|
913 headers = { | 913 headers = { |
914 ["Content-Type"] = "text/javascript"; | 914 ["Content-Type"] = "text/javascript"; |
915 }; | 915 }; |
916 body = templates.js; | 916 body = templates.js; |
917 } or nil; | 917 } or nil; |
918 | |
919 -- Some convenient fallback handlers | |
920 ["GET /register"] = { headers = { content_type = "application/schema+json" }; body = json.encode(registration_schema) }; | |
918 }; | 921 }; |
919 }); | 922 }); |
920 | 923 |
921 local http_server = require "net.http.server"; | 924 local http_server = require "net.http.server"; |
922 | 925 |