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.
master
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. 10
      README.md

10
README.md

@ -144,6 +144,16 @@ new_user = keycloak_admin.create_user({"email": "example@example.com",
"lastName": "Example",
"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
count_users = keycloak_admin.users_count()

Loading…
Cancel
Save