0001-pwa-set-an-explicit-exp-claim-in-vapid-JWT-token-658.patch
combo/apps/pwa/signals.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
import datetime |
|
17 | 18 |
import json |
18 | 19 |
import logging |
19 | 20 | |
... | ... | |
44 | 45 |
if settings.PWA_VAPID_CLAIMS: # legacy |
45 | 46 |
claims = settings.PWA_VAPID_CLAIMS |
46 | 47 |
else: |
47 |
claims = {'sub': 'mailto:%s' % settings.DEFAULT_FROM_EMAIL} |
|
48 |
claims = { |
|
49 |
'sub': 'mailto:%s' % settings.DEFAULT_FROM_EMAIL, |
|
50 |
'exp': int(datetime.datetime.now().timestamp() + 3600 * 3), |
|
51 |
} |
|
48 | 52 |
message = json.dumps( |
49 | 53 |
{ |
50 | 54 |
'summary': instance.summary, |
51 |
- |