Browse Source

Use the same request headers and cookies

pull/151/head
Ilya Glotov 4 years ago
parent
commit
fa9f1741af
No known key found for this signature in database GPG Key ID: AE18CC224730A36D
  1. 7
      keycloak/keycloak_admin.py

7
keycloak/keycloak_admin.py

@ -26,6 +26,7 @@
import json import json
from builtins import isinstance from builtins import isinstance
from copy import deepcopy
from typing import Iterable from typing import Iterable
from .connection import ConnectionManager from .connection import ConnectionManager
@ -1737,10 +1738,8 @@ class KeycloakAdmin:
# merge custom headers to main headers # merge custom headers to main headers
headers.update(self.custom_headers) headers.update(self.custom_headers)
self._connection = ConnectionManager(base_url=self.server_url,
headers=headers,
timeout=60,
verify=self.verify)
self._connection = deepcopy(self.keycloak_openid.connection())
self._connection._headers.update(headers)
def refresh_token(self): def refresh_token(self):
refresh_token = self.token.get('refresh_token') refresh_token = self.token.get('refresh_token')

Loading…
Cancel
Save