Mercurial > prosody-modules
comparison mod_auth_oauth_external/mod_auth_oauth_external.lua @ 6526:1216f6befbe7
mod_auth_oauth_external: Raise error when configured without at least one endpoint
Module does not work if both are unset.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 02 May 2026 16:13:35 +0200 |
| parents | 05d66fe6b289 |
| children | 6241b2f5e92f |
comparison
equal
deleted
inserted
replaced
| 6525:05d66fe6b289 | 6526:1216f6befbe7 |
|---|---|
| 29 issuer -> discovery -> { registration validation } | 29 issuer -> discovery -> { registration validation } |
| 30 registration -> { client_id client_secret } | 30 registration -> { client_id client_secret } |
| 31 { client_id client_secret validation } -> required | 31 { client_id client_secret validation } -> required |
| 32 } | 32 } |
| 33 --]] | 33 --]] |
| 34 | |
| 35 assert(validation_endpoint or token_endpoint, | |
| 36 "One or both of 'oauth_external_validation_endpoint' and 'oauth_external_token_endpoint' must be configured"); | |
| 34 | 37 |
| 35 local accounts = module:open_store("accounts"); | 38 local accounts = module:open_store("accounts"); |
| 36 | 39 |
| 37 local host = module.host; | 40 local host = module.host; |
| 38 local provider = {}; | 41 local provider = {}; |
