Browse Source

Replaced deprecated method, improved description and added packages to requirements.

master
andreas 3 years ago
parent
commit
988700bc81
  1. 6
      keycloak/connection.py
  2. 2
      keycloak/keycloak_admin.py
  3. 4
      requirements.txt

6
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)

2
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']

4
requirements.txt

@ -1,4 +1,6 @@
requests>=2.20.0
httmock>=1.2.5
python-jose>=1.4.0
twine==1.13.0
twine==1.13.0
jose~=1.0.0
setuptools~=54.2.0
Loading…
Cancel
Save