Browse Source

add example to create user and specify locale

Usage of the `attributes`for this kind of task with not quite obvious and documentation hard to find.
pull/189/head
Sandro Covo 4 years ago
committed by GitHub
parent
commit
a39ff81e62
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      README.md

12
README.md

@ -142,7 +142,17 @@ new_user = keycloak_admin.create_user({"email": "example@example.com",
"enabled": True, "enabled": True,
"firstName": "Example", "firstName": "Example",
"lastName": "Example", "lastName": "Example",
"credentials": [{"value": "secret","type": "password",}]})
"credentials": [{"value": "secret","type": "password",}]})
# Add user and specify a locale
new_user = keycloak_admin.create_user({"email": "example@example.fr",
"username": "example@example.fr",
"enabled": True,
"firstName": "Example",
"lastName": "Example",
"attributes": {
"locale": ["fr"]
})
# User counter # User counter
count_users = keycloak_admin.users_count() count_users = keycloak_admin.users_count()

Loading…
Cancel
Save