|
@ -54,6 +54,8 @@ class KeycloakAdmin: |
|
|
:type username: str |
|
|
:type username: str |
|
|
:param password: admin password |
|
|
:param password: admin password |
|
|
:type password: str |
|
|
:type password: str |
|
|
|
|
|
:param token: access and refresh tokens |
|
|
|
|
|
:type token: dict |
|
|
:param totp: Time based OTP |
|
|
:param totp: Time based OTP |
|
|
:type totp: str |
|
|
:type totp: str |
|
|
:param realm_name: realm name |
|
|
:param realm_name: realm name |
|
@ -88,7 +90,6 @@ class KeycloakAdmin: |
|
|
_client_secret_key = None |
|
|
_client_secret_key = None |
|
|
_auto_refresh_token = None |
|
|
_auto_refresh_token = None |
|
|
_connection = None |
|
|
_connection = None |
|
|
_token = None |
|
|
|
|
|
_custom_headers = None |
|
|
_custom_headers = None |
|
|
_user_realm_name = None |
|
|
_user_realm_name = None |
|
|
|
|
|
|
|
@ -97,6 +98,7 @@ class KeycloakAdmin: |
|
|
server_url, |
|
|
server_url, |
|
|
username=None, |
|
|
username=None, |
|
|
password=None, |
|
|
password=None, |
|
|
|
|
|
token=None, |
|
|
totp=None, |
|
|
totp=None, |
|
|
realm_name="master", |
|
|
realm_name="master", |
|
|
client_id="admin-cli", |
|
|
client_id="admin-cli", |
|
@ -115,6 +117,8 @@ class KeycloakAdmin: |
|
|
:type username: str |
|
|
:type username: str |
|
|
:param password: admin password |
|
|
:param password: admin password |
|
|
:type password: str |
|
|
:type password: str |
|
|
|
|
|
:param token: access and refresh tokens |
|
|
|
|
|
:type token: dict |
|
|
:param totp: Time based OTP |
|
|
:param totp: Time based OTP |
|
|
:type totp: str |
|
|
:type totp: str |
|
|
:param realm_name: realm name |
|
|
:param realm_name: realm name |
|
@ -139,6 +143,7 @@ class KeycloakAdmin: |
|
|
self.server_url = server_url |
|
|
self.server_url = server_url |
|
|
self.username = username |
|
|
self.username = username |
|
|
self.password = password |
|
|
self.password = password |
|
|
|
|
|
self.token = token |
|
|
self.totp = totp |
|
|
self.totp = totp |
|
|
self.realm_name = realm_name |
|
|
self.realm_name = realm_name |
|
|
self.client_id = client_id |
|
|
self.client_id = client_id |
|
@ -150,7 +155,8 @@ class KeycloakAdmin: |
|
|
self.timeout = timeout |
|
|
self.timeout = timeout |
|
|
|
|
|
|
|
|
# Get token Admin |
|
|
# Get token Admin |
|
|
self.get_token() |
|
|
|
|
|
|
|
|
if not self.token: |
|
|
|
|
|
self.get_token() |
|
|
|
|
|
|
|
|
@property |
|
|
@property |
|
|
def server_url(self): |
|
|
def server_url(self): |
|
|