Browse Source
Merge pull request #183 from double-a/master
urllib3's method_whitelist is deprecated
pull/199/head
Marcos Pereira
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
7 additions and
5 deletions
-
keycloak/connection.py
-
keycloak/keycloak_admin.py
-
requirements.txt
|
@ -54,9 +54,9 @@ class ConnectionManager(object): |
|
|
for protocol in ('https://', 'http://'): |
|
|
for protocol in ('https://', 'http://'): |
|
|
adapter = HTTPAdapter(max_retries=1) |
|
|
adapter = HTTPAdapter(max_retries=1) |
|
|
# adds POST to retry whitelist |
|
|
# 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) |
|
|
self._s.mount(protocol, adapter) |
|
|
|
|
|
|
|
|
|
@ -77,7 +77,7 @@ class KeycloakAdmin: |
|
|
:param realm_name: realm name |
|
|
:param realm_name: realm name |
|
|
:param client_id: client id |
|
|
:param client_id: client id |
|
|
:param verify: True if want check connection SSL |
|
|
: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 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 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'] |
|
|
:param auto_refresh_token: list of methods that allows automatic token refresh. ex: ['get', 'put', 'post', 'delete'] |
|
|
|
@ -1,4 +1,6 @@ |
|
|
requests>=2.20.0 |
|
|
requests>=2.20.0 |
|
|
httmock>=1.2.5 |
|
|
httmock>=1.2.5 |
|
|
python-jose>=1.4.0 |
|
|
python-jose>=1.4.0 |
|
|
twine==1.13.0 |
|
|
|
|
|
|
|
|
twine==1.13.0 |
|
|
|
|
|
jose~=1.0.0 |
|
|
|
|
|
setuptools~=54.2.0 |