Browse Source
Merge pull request #189 from sacovo/patch-1
add example to create user and specify locale
master
Marcos Pereira
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
11 additions and
1 deletions
-
README.md
|
|
@ -142,7 +142,17 @@ new_user = keycloak_admin.create_user({"email": "example@example.com", |
|
|
|
"enabled": True, |
|
|
|
"firstName": "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 |
|
|
|
count_users = keycloak_admin.users_count() |
|
|
|