Project

General

Profile

Task #17061

WSC: User retrieval web service

Added by Sachin Divekar over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
02/11/2023
Due date:
% Done:

10%

Estimated time:

Description

The web service should accept a user name or ID as input and return the corresponding user details from Keycloak.

  • Use Alya to create the web service.
  • Use gocloak to get the user from Keycloak based on the ID or username provided in the request.
  • Handle any errors that may occur during the user creation process and returning the error response.
  • Test the web service to ensure it returns the correct user and required details.

user-get web service


Files

clipboard-202311211819-dilm2.png (82.9 KB) clipboard-202311211819-dilm2.png getByID Aniket Shinde, 21/11/2023 06:19 PM
clipboard-202311211820-iridk.png (85 KB) clipboard-202311211820-iridk.png geByUserName Aniket Shinde, 21/11/2023 06:20 PM
clipboard-202311211821-xlzjp.png (46.3 KB) clipboard-202311211821-xlzjp.png missing username & id Aniket Shinde, 21/11/2023 06:21 PM
clipboard-202311221604-da3sw.png (42.4 KB) clipboard-202311221604-da3sw.png USER_NOT_FOUND_WITH_USERNAME Aniket Shinde, 22/11/2023 04:04 PM
clipboard-202311221616-yadpx.png (43.3 KB) clipboard-202311221616-yadpx.png USER_NOT_FOUND_WITH_ID Aniket Shinde, 22/11/2023 04:16 PM
#1

Updated by Aniket Shinde over 1 year ago

Create User retrieval web service:

  1. Created User retrieval web service by ID:[GET("/user/:id", getUserByID)]

1) getByID:
getByID

2) getByUserName:
geByUserName

3)Missing both ID & UserName:
missing username & id

#2

Updated by Aniket Shinde over 1 year ago

  • % Done changed from 0 to 10

fix: Response payload (implemented required field in response)

GetUser: response

{
  "status": "success",
  "data": {
    "id": "ac6bd3cb-7007-4fc2-ba3d-586dbc41ec0f",
    "username": "user_1",
    "firstName": "User",
    "lastName": "One",
    "emailVerified": true,
    "enabled": true
  },
  "messages": []
}

CreateUser : response

{
  "status": "success",
  "data": {
    "id": "d8425004-0d12-46a3-a737-2f5fbb5daeca",
    "username": "user_12",
    "email": "Brij@domain.com",
    "firstName": "Brij",
    "lastName": "Endra",
    "enabled": true
  },
  "messages": []
}
#4

Updated by Sachin Divekar about 1 year ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF