|
@ -319,4 +319,10 @@ idps = keycloak_admin.get_idps() |
|
|
# Create a new Realm |
|
|
# Create a new Realm |
|
|
keycloak_admin.create_realm(payload={"realm": "demo"}, skip_exists=False) |
|
|
keycloak_admin.create_realm(payload={"realm": "demo"}, skip_exists=False) |
|
|
|
|
|
|
|
|
|
|
|
# Changing Realm |
|
|
|
|
|
keycloak_admin = KeycloakAdmin(realm_name="main", ...) |
|
|
|
|
|
keycloak_admin.get_users() # Get user in main realm |
|
|
|
|
|
keycloak_admin.realm_name = "demo" # Change realm to 'demo' |
|
|
|
|
|
keycloak_admin.get_users() # Get users in realm 'demo' |
|
|
|
|
|
keycloak_admin.create_user(...) # Creates a new user in 'demo' |
|
|
``` |
|
|
``` |