Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 644 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 644 Bytes

mod_auth_internal_jwt

A Prosody SASL module to authenticate users using a JWT (JSON Wet Token).

Example Config

VirtualHost "host.tld"
    authentication = "internal_jwt"
    jwt_signing_secret = "something-decently-secret-with-entropy"
    ssl = {
        -- Setup TLS Ok?
        -- Otherwise the token would be clear text and that's bad
    }

The token

{
    "jid": "[email protected]"
}

Todo

  • Nonces to prevent replay attacks
  • Timestamps to prevent old tokens authenticating
  • Expiry timestamp for the same reason
  • Per user secrets stored in the manager?
  • More than one secret?