Mercurial > prosody-hg
comparison plugins/mod_component.lua @ 8134:b87e281a7d59
mod_component: Use typed config API
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 26 Apr 2017 16:54:58 +0200 |
| parents | 679746cdf3cc |
| children | 5c91fb62338e 97b3ca502547 |
comparison
equal
deleted
inserted
replaced
| 8132:6ddddfe05a74 | 8134:b87e281a7d59 |
|---|---|
| 64 (session.log or log)("warn", "Invalid component handshake for host: %s", session.host); | 64 (session.log or log)("warn", "Invalid component handshake for host: %s", session.host); |
| 65 session:close("not-authorized"); | 65 session:close("not-authorized"); |
| 66 return true; | 66 return true; |
| 67 end | 67 end |
| 68 | 68 |
| 69 local secret = module:get_option("component_secret"); | 69 local secret = module:get_option_string("component_secret"); |
| 70 if not secret then | 70 if not secret then |
| 71 (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host); | 71 (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host); |
| 72 session:close("not-authorized"); | 72 session:close("not-authorized"); |
| 73 return true; | 73 return true; |
| 74 end | 74 end |
