From 988700bc8191b9f565379e6be6e536b8b6829be9 Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 29 Mar 2021 16:22:47 +0200 Subject: [PATCH] Replaced deprecated method, improved description and added packages to requirements. --- keycloak/connection.py | 6 +++--- keycloak/keycloak_admin.py | 2 +- requirements.txt | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/keycloak/connection.py b/keycloak/connection.py index 3871482..7d5ed2f 100644 --- a/keycloak/connection.py +++ b/keycloak/connection.py @@ -54,9 +54,9 @@ class ConnectionManager(object): for protocol in ('https://', 'http://'): adapter = HTTPAdapter(max_retries=1) # adds POST to retry whitelist - method_whitelist = set(adapter.max_retries.method_whitelist) - method_whitelist.add('POST') - adapter.max_retries.method_whitelist = frozenset(method_whitelist) + allowed_methods = set(adapter.max_retries.allowed_methods) + allowed_methods.add('POST') + adapter.max_retries.allowed_methods = frozenset(allowed_methods) self._s.mount(protocol, adapter) diff --git a/keycloak/keycloak_admin.py b/keycloak/keycloak_admin.py index c0ac364..e52d20e 100644 --- a/keycloak/keycloak_admin.py +++ b/keycloak/keycloak_admin.py @@ -77,7 +77,7 @@ class KeycloakAdmin: :param realm_name: realm name :param client_id: client id :param verify: True if want check connection SSL - :param client_secret_key: client secret key + :param client_secret_key: client secret key (optional, required only for access type confidential) :param custom_headers: dict of custom header to pass to each HTML request :param user_realm_name: The realm name of the user, if different from realm_name :param auto_refresh_token: list of methods that allows automatic token refresh. ex: ['get', 'put', 'post', 'delete'] diff --git a/requirements.txt b/requirements.txt index d4776e3..f4faf6d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,6 @@ requests>=2.20.0 httmock>=1.2.5 python-jose>=1.4.0 -twine==1.13.0 \ No newline at end of file +twine==1.13.0 +jose~=1.0.0 +setuptools~=54.2.0 \ No newline at end of file