You are on page 1of 5

Dokumentasi LDAP for USMS

1. API Path yang dijalankan


a. http://localhost:8090/api/ldap/login (Localhost)
b.
c. Requet Body :

{   

     "username"      : "christiantol@generali.co.id",
     "password"      : "Generali2020",
     "groupName"     : "Customer Testimony",
     "appCode"       : "Iservice",
     "appSecret"     : "IserviceSecret"
}
d. Response :
{
    "data": {
        "userId": 96518,
        "userName": "christiantol@generali.co.id",
        "fullName": "Christianto Lie",
        "badPasswordCount": 0,
        "autoUnlockRule": null,
        "status": 1,
        "email": "christiantol@generali.co.id",
        "effectiveFrom": null,
        "effectiveTo": null,
        "lastLogin": "2021-01-27T12:16:23.821+0000",
        "lastLoginLocation": null,
        "lastAppUsed": 7,
        "lastPassChangeDate": "2021-01-27T12:14:43.063+0000",
        "lastProductivityDate": null,
        "created": "2021-01-20T04:18:38.877+0000",
        "modified": "2021-01-27T12:14:42.977+0000",
        "phoneNumber": "",
        "gender": null,
        "dob": null,
        "roles": [],
        "referenceUserMasters": [
            {
                "referenceUserId": 96234,
                "userId": 96518,
                "userType": "User",
                "userReference": "Customer Testimony",
                "created": "2021-01-20T04:18:38.993+0000",
                "createdBy": 0,
                "modified": "2021-01-20T04:18:38.993+0000",
                "modifiedBy": 0,
                "appId": 7,
                "note": "LDAP-GROUP",
                "theUser": null,
                "theApp": null
            }
        ],
        "lastApp": null
    },
    "message": "Success",
    "status": "OK"
}
e. Jika terjadi kesalahan Username / password request
{
     "statusCode": 500,
     "statusDescription": "Internal Server Error",
     "errorMessage": "Authentication Failed. Username or Password not valid."
}

f. Jika terjadi kesalahan Group Name Request


{
     "statusCode": 500,
     "statusDescription": "Internal Server Error",
"errorMessage": "Authentication Failed. Username not authorized for this 
group"
}
g. Jika GroupName tidak di isi(kosong) / null
{
     "statusCode": 403,
     "statusDescription": "Forbidden",
     "errorMessage": "Invalid LDAP GROUP name"
}

h. Jika terjadi kesalahan appCode/appSecret Request


{
"statusCode": 403,
     "statusDescription": "Forbidden",
     "errorMessage": "Invalid Application authentication"
}

2. Semua yang ada di dalam request body harus menggunakan GroupName bawaan yaitu
Customer Testimony
USER LOGIN EXISTING

endpoint Method
https://uat-usms-ws.generali.co.id/api/user/login POST

field Mandatory Description


username M Username
password M Password
appCode M App Code
appSecret M App secret
ldap O Ldap Group Name

Request Param

"username":"riganp@generali.co.id",

"password":"Generali678",

"appCode":"Iservice",

"appSecret":"IserviceSecret",

"ldap":"Customer Testimony"

}
Response success
{
"status": "OK",
"message": "Success",
"data": {
"userId": 96492,
"userName": "riganp@generali.co.id",
"fullName": "Rigan Purnama",
"badPasswordCount": 0,
"autoUnlockRule": null,
"status": 1,
"email": "yodhian.stefano@generali.co.id",
"effectiveFrom": null,
"effectiveTo": null,
"lastLogin": "2021-01-28T03:57:40.353+0000",
"lastLoginLocation": null,
"lastAppUsed": 7,
"lastPassChangeDate": null,
"lastProductivityDate": null,
"created": "2021-01-10T00:40:35.080+0000",
"modified": "2021-01-10T00:40:35.080+0000",
"phoneNumber": "081286087188",
"gender": null,
"dob": null,
"roles": [],
"referenceUserMasters": [
{
"referenceUserId": 96209,
"userId": 96492,
"userType": "User",
"userReference": "Customer Testimony",
"created": "2021-01-10T00:40:41.673+0000",
"createdBy": 0,
"modified": "2021-01-10T00:40:41.673+0000",
"modifiedBy": 0,
"appId": 7,
"note": "LDAP-GROUP",
"theUser": null,
"theApp": null
}
],
"lastApp": null
}
}
Response failed

"status": "OK",

"message": "Authentication Failed. wrong ldap password."

You might also like