mod_unified_push/README.md
changeset 5160 a8df4d2447d0
parent 5143 449e4ca4de32
child 5161 9032143bad08
equal deleted inserted replaced
5159:18ed655c755d 5160:a8df4d2447d0
    24 XMPP. It does not send push notifications to disconnected XMPP clients. For
    24 XMPP. It does not send push notifications to disconnected XMPP clients. For
    25 that, see [mod_cloud_notify](https://modules.prosody.im/mod_cloud_notify).
    25 that, see [mod_cloud_notify](https://modules.prosody.im/mod_cloud_notify).
    26 
    26 
    27 ## Configuration
    27 ## Configuration
    28 
    28 
    29 | Name                          | Description                                            | Default               |
    29 | Name                          | Description                                             | Default                                     |
    30 |-------------------------------|--------------------------------------------------------|-----------------------|
    30 |-------------------------------|---------------------------------------------------------|---------------------------------------------|
    31 | unified_push_secret           | A random secret string (32+ bytes), used for auth      |                       |
    31 | unified_push_acl              | A list of domains or users permitted to use the service | current host, or parent host if a component |
    32 | unified_push_registration_ttl | Maximum lifetime of a push registration (seconds)      | `86400` (1 day)       |
    32 | unified_push_backend          | Backend to use: "paseto", "storage" or "jwt"            | "paseto" (trunk), "storage" (0.12)          |
       
    33 | unified_push_registration_ttl | Maximum lifetime of a push registration (seconds)       | `86400` (1 day)                             |
       
    34 
       
    35 ### Backends
       
    36 
       
    37 The module needs to track registrations, and be able to associate tokens with
       
    38 users. There are multiple ways to do this, but not every method is supported
       
    39 on every Prosody version.
       
    40 
       
    41 By default the module will automatically select the best backend that is
       
    42 supported on the current Prosody version you are using.
       
    43 
       
    44 #### storage backend
       
    45 
       
    46 This is the default backend on Prosody 0.12 and earlier. It stores tokens and
       
    47 their associated data in Prosody's configured data store.
       
    48 
       
    49 Supported by all Prosody versions.
       
    50 
       
    51 #### paseto backend
       
    52 
       
    53 This is a stateless (i.e. no storage required) backend that uses encrypted
       
    54 [PASETO tokens](https://paseto.io/) to store registration info. It is the
       
    55 default backend on Prosody trunk, as PASETO support is not available in
       
    56 Prosody 0.12 and earlier.
       
    57 
       
    58 #### jwt backend
       
    59 
       
    60 This is a stateless backend that uses [JWT tokens](https://jwt.io/) to store
       
    61 registration info. It is supported in Prosody 0.12 and higher.
       
    62 
       
    63 **Note:** The JWT tokens are **not encrypted**, which means the JID
       
    64 associated with a registration is visible to apps and services that send you
       
    65 push notifications. This can have privacy implications. If in doubt, do not
       
    66 use this backend.
       
    67 
       
    68 This backend requires you to set a secure random string in the config file,
       
    69 using the `unified_push_secret` option.
    33 
    70 
    34 A random push secret can be generated with the command
    71 A random push secret can be generated with the command
    35 `openssl rand -base64 32`. Changing the secret will invalidate all existing
    72 `openssl rand -base64 32`. Changing the secret will invalidate all existing
    36 push registrations.
    73 push registrations.
       
    74 
       
    75 ### HTTP configuration
    37 
    76 
    38 This module exposes a HTTP endpoint (to receive push notifications from app
    77 This module exposes a HTTP endpoint (to receive push notifications from app
    39 servers). For more information on configuring HTTP services in Prosody, see
    78 servers). For more information on configuring HTTP services in Prosody, see
    40 [Prosody HTTP documentation](https://prosody.im/doc/http).
    79 [Prosody HTTP documentation](https://prosody.im/doc/http).
    41 
    80 
    55 ```
    94 ```
    56 
    95 
    57 ## Compatibility
    96 ## Compatibility
    58 
    97 
    59 | trunk | Works |
    98 | trunk | Works |
    60 | 0.12  | Should work |
    99 | 0.12  | Works |