From c3d0620880d71fe2f4fae3246ecca40fe93f76a4 Mon Sep 17 00:00:00 2001 From: Sylvain Delabye Date: Fri, 29 Sep 2023 15:46:30 +0200 Subject: [PATCH] Add oauth webhook scopes --- CHANGELOG | 2 +- django_adobesign/client.py | 4 +++- django_adobesign/tests/test_adobe_client.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a8206b4..42bfff5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,7 +7,7 @@ about future releases, check `milestones`_ and :doc:`/about/vision`. 0.13 (unreleased) ----------------- -- Nothing changed yet +- Add oauth scopes for webhooks 0.12 (2022-12-05) diff --git a/django_adobesign/client.py b/django_adobesign/client.py index 815f0d8..b2d20e7 100644 --- a/django_adobesign/client.py +++ b/django_adobesign/client.py @@ -32,7 +32,9 @@ def get_scopes(account_type): 'user_login:{}', 'agreement_send:{}', 'agreement_read:{}', - 'agreement_write:{}')] + 'agreement_write:{}', + 'webhook_write:{}', + 'webhook_read:{}')] def create_token(self, code, application_secret): response = self.oauth_session.fetch_token( diff --git a/django_adobesign/tests/test_adobe_client.py b/django_adobesign/tests/test_adobe_client.py index 322fca5..421434a 100644 --- a/django_adobesign/tests/test_adobe_client.py +++ b/django_adobesign/tests/test_adobe_client.py @@ -30,6 +30,8 @@ def test_oauth_get_scopes(): assert 'agreement_send:account' in scopes assert 'agreement_read:account' in scopes assert 'agreement_write:account' in scopes + assert 'webhook_write:account' in scopes + assert 'webhook_read:account' in scopes def test_oauth_create(mocker, adobe_oauth_session):