Software /
code /
prosody-modules
Comparison
mod_http_oauth2/mod_http_oauth2.lua @ 5194:25041e15994e
mod_http_oauth2: Comment on mutation by other module
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 03 Mar 2023 21:45:05 +0100 |
parent | 5193:2bb29ece216b |
child | 5195:b4932915e773 |
comparison
equal
deleted
inserted
replaced
5193:2bb29ece216b | 5194:25041e15994e |
---|---|
139 end | 139 end |
140 | 140 |
141 local redirect_uri = get_redirect_uri(client, params.redirect_uri); | 141 local redirect_uri = get_redirect_uri(client, params.redirect_uri); |
142 if redirect_uri == "urn:ietf:wg:oauth:2.0:oob" then | 142 if redirect_uri == "urn:ietf:wg:oauth:2.0:oob" then |
143 -- TODO some nicer template page | 143 -- TODO some nicer template page |
144 -- mod_http_errors will set content-type to text/plain if it catches this event | |
144 local response = { status_code = 200; headers = { content_type = "text/plain" } } | 145 local response = { status_code = 200; headers = { content_type = "text/plain" } } |
145 response.body = module:context("*"):fire_event("http-message", { | 146 response.body = module:context("*"):fire_event("http-message", { |
146 response = response; | 147 response = response; |
147 title = "Your authorization code"; | 148 title = "Your authorization code"; |
148 message = "Here's your authorization code, copy and paste it into your app:"; | 149 message = "Here's your authorization code, copy and paste it into your app:"; |