Mercurial > prosody-modules
comparison mod_http_oauth2/mod_http_oauth2.lua @ 5206:31c62df82aa8
mod_http_oauth2: Clarify comment referencing mod_http_errors (thanks MattJ)
Must have typed text/plain twice by accident here.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 05 Mar 2023 12:38:20 +0100 |
parents | b6f41f0b5f58 |
children | c72e3b0914e8 |
comparison
equal
deleted
inserted
replaced
5205:b6f41f0b5f58 | 5206:31c62df82aa8 |
---|---|
140 end | 140 end |
141 | 141 |
142 local redirect_uri = get_redirect_uri(client, params.redirect_uri); | 142 local redirect_uri = get_redirect_uri(client, params.redirect_uri); |
143 if redirect_uri == "urn:ietf:wg:oauth:2.0:oob" then | 143 if redirect_uri == "urn:ietf:wg:oauth:2.0:oob" then |
144 -- TODO some nicer template page | 144 -- TODO some nicer template page |
145 -- mod_http_errors will set content-type to text/plain if it catches this event | 145 -- mod_http_errors will set content-type to text/html if it catches this |
146 -- event, if not text/plain is kept for the fallback text. | |
146 local response = { status_code = 200; headers = { content_type = "text/plain" } } | 147 local response = { status_code = 200; headers = { content_type = "text/plain" } } |
147 response.body = module:context("*"):fire_event("http-message", { | 148 response.body = module:context("*"):fire_event("http-message", { |
148 response = response; | 149 response = response; |
149 title = "Your authorization code"; | 150 title = "Your authorization code"; |
150 message = "Here's your authorization code, copy and paste it into " .. (client.client_name or "your client"); | 151 message = "Here's your authorization code, copy and paste it into " .. (client.client_name or "your client"); |