mirror of
https://github.com/valitydev/kc-user-manager.git
synced 2024-11-06 00:25:15 +00:00
e6164a401b
* JD-426: bump keycloak to 14.0.0 (#6) |
||
---|---|---|
build_utils@c67c2590c9 | ||
img | ||
src | ||
.gitignore | ||
.gitmodules | ||
Jenkinsfile | ||
LICENSE | ||
pom.xml | ||
README.md |
kc-user-manager
General
Service to manage keycloak users.
- It can create user and send email actions: verify email and send magic link to set/update password.
- Service can work with different realms, each request must have realm specified
- List of available realms and connection parameters are set in application.yml
keycloak:
auth-server-url: http://localhost:8080/auth
admin-clients:
external:
client-id: user-manager-service
client-secret: 4f213624-7190-421f-9e3c-5198737a7d9c
timeouts-ms: 10000
pool-size: 2
master:
client-id: admin-cli
client-secret: 7cfe46c7-90f7-4cae-a6cc-3ad7bb0296db
timeouts-ms: 15000
pool-size: 1
Create user
Request:
{
"user_id": {
"email": "ivan.sidorov@mail.ru",
"realm": "external"
},
"first_name":"Ivan",
"last_name":"Sidorov"
}
Response:
- User's resource value in Location header
http://localhost:8080/auth/admin/realms/master/users/91be9c23-2091-48e6-bf08-ee24102baa9d - Username of created user is equal to email
Email Actions
Few Methods have same logic and request entities:
- SendVerifyUserEmail
- SendUpdatePasswordEmail
{
"user_id": {
"email": "ivan.sidorov@mail.ru",
"realm": "external"
},
"redirect_params": {
"client_id": "redirect-client",
"redirect_uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
}
Note:
- client_id has to exist in keycloak
- redirect_uri has to be within valid uris of specified client