πŸ”Dapta Auth

Dapta Auth is a secure authentication system. This documentation provides detailed information on how to implement and utilize Dapta Auth in various applications and platforms.

Login

This endpoint is used to authenticate and login users. It is an HTTP POST request to the specified URL with a dynamic user pool parameter. The request requires a raw body with the username and password fields. Upon successful execution, it returns a status code of 200 along with a token in the response body.

POST - https://services.dapta.ai/authentication/{{users-pool}}/auth/login

Body:

{
    "username": "username",
    "password": "pass"
}

Password Change

This API endpoint is used to change the password for a user in the specified user pool. The HTTP POST. The response to this request will have a status code of 204, indicating a successful operation. The response body will be null.

POST - https://services.dapta.ai/authentication/{{users-pool}}/auth/change-password

Headers:

Authorization : Bearer <token user logged>

Body:

{
    "oldPassword": "pass",
    "newPassword": "pass"
}

Create User

This endpoint is used to create a new user in the specified user pool. It is an HTTP POST request to the designated URL. The request requires a raw body with the necessary user details. Upon successful execution, it returns a status code of 201 along with the created user data in the response body.

POST - https://services.dapta.ai/authentication/{{users-pool}}/users/

Body:

{
    "username": "new_user",
    "password": "new_pass"
}

List Users

This API endpoint is used to retrieve a list of all users in the specified user pool. It is an HTTP GET request to the designated URL. Upon successful execution, it returns a status code of 200 along with the list of users in the response body.

GET - https://services.dapta.ai/authentication/{{users-pool}}/users/

Get User

This API endpoint is used to retrieve the details of a specific user in the specified user pool. It is an HTTP GET request to the designated URL with the user's unique identifier as a parameter. Upon successful execution, it returns a status code of 200 along with the user's data in the response body.

GET - https://services.dapta.ai/authentication/{{users-pool}}/users/{{user-id}}

Update User

This endpoint is used to update the details of a specific user in the specified user pool. It is an HTTP PUT request to the designated URL with the user's unique identifier as a parameter. The request requires a raw body with the updated user details. Upon successful execution, it returns a status code of 204 .

PATCH - [https://services.dapta.ai/authentication/{{users-pool}}/users/{{user-id}}

body

{
    "username": "updated_user",
    "role": "ADMIN" / "USER"
}

Delete User

This API endpoint is used to delete a specific user from the specified user pool. It is an HTTP DELETE request to the designated URL with the user's unique identifier as a parameter. Upon successful execution, it returns a status code of 204, indicating a successful operation. The response body will be null.

DELETE - https://services.dapta.ai/authentication/{{users-pool}}/users/{{user-id}}

To test with your created pool you can download these postman requests:

DAPTA Auth.postman_collection-2.json

Last updated