LDAP Authentication
This API authenticates a user against the connected LDAP directory server and returns an access token and refresh token on success.
Endpoint Details
| URL | /v1/ldap/authenticate |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Body
Use the following format to make a request:
JSON Request
{
"username": "member_aplikasi",
"password": "your_password"
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| username | String | LDAP account name of the user authenticating |
| password | String | LDAP password of the user authenticating |
Response
Here is an example response after the request has been successfully processed:
Response
{
"access_token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI1NjNjOTQxYi1mMTlmLTQ3NjgtODI4NS1mZjgxYWQ4ZTZmNTUiLCJlbWFpbCI6Im1lbWJlcmFwbGlrYXNpNzIwQGdtYWlsLmNvbSIsILWYxOWYtNDc2OC04Mjg1LWZmODFhZDhlNmY1NSIsImV4cCI6MTc4NTEzMjMzOCwiaWF0IjoxNzg1MTI4NzM4fQ.5kPniTpWtQcLXb5a08RBdoMj_WUmJXO95mmkaYKt2IF0mnBIaMd3tJE5VVl84PDR3LKMct3nM65YoJEMsavMCQ",
"refresh_token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1NjNjOTQxYi1mMTlmLTQ3NjgtODI4NS1mZjgxYWQ4ZTZmNTUiLCJleHAiOjE3ODUyMTUxMzgsImlhdCI6MTc4NTEyODczOH0.sDzFvP1IDz-kPg-3sJzFYkLXsR6FaZVDWpEklUbnxPXfA3Qwwb3MkC043iingMzIVO4u0AZjgqybWOMoyrTuBA",
"expires_at": 1785132338,
"email": "member.aplikasi@example.com"
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| access_token | String | JWT access token used to authenticate subsequent requests |
| refresh_token | String | JWT refresh token used to obtain a new access token |
| expires_at | Integer | Expiration timestamp of the access token in Unix format |
| String | Email address of the authenticated user |
info
- A valid Bearer Token is required to access this endpoint.
- The user must exist in the connected LDAP directory.
- Use the
access_tokenas the Bearer Token for subsequent API requests, and therefresh_tokento obtain a new access token when it expires. - Store the returned tokens securely and never expose them.
- Unix timestamp fields can be converted to a human-readable date and time format as needed.