Authentication API

This is the Authentication API that provides programmatic access to various resources and services. The API supports the following areas: User Login. All endpoints require authentication using a Bearer token.

The authentication model

The authentication model contains all the information about your authentication entities.

Properties

  • Name
    certificate
    Type
    string
    Description

    The certificate for the authentication.

  • Name
    certificateChain
    Type
    array
    Description

    The certificateChain for the authentication.

  • Name
    clientNonce
    Type
    string
    Description

    The clientNonce for the authentication.

  • Name
    deviceInfo
    Type
    object
    Description

    Schema for deviceInfo


User Login Via Certificate

Provides secure passwordless authentication using digital certificates for enterprise users and high-security scenarios

Request

POST
/v1/users/certificate/login
curl -X POST https://api.adiba.app/v1/users/certificate/login \
  -H "Authorization: Bearer {token}" \
  -d '{
"certificate": "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSk...",
"certificateChain": [
    "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSk...",
    "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSk..."
],
"clientNonce": "abc123def456ghi789",
"deviceInfo": {
    "deviceId": "DEV_001_20241201_001",
    "deviceType": "DESKTOP",
    "appVersion": "1.0.0"
}
}'
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"tokenType": "Bearer",
"expiresIn": 3600,
"userId": "USR_001_20241201_001",
"userProfile": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@email.com",
    "verificationLevel": "FULL"
},
"permissions": [
    "READ_ACCOUNT",
    "WRITE_TRANSACTIONS",
    "MANAGE_PROFILE"
],
"message": "Login successful"
}

User Login Via Password

Standard authentication endpoint validating username and password with MFA integration and device fingerprinting

Request

POST
/v1/users/password/login
curl -X POST https://api.adiba.app/v1/users/password/login \
  -H "Authorization: Bearer {token}" \
  -d '{
"username": "john.doe",
"password": "SecurePass123!",
"deviceInfo": {
    "deviceId": "DEV_001_20241201_001",
    "deviceType": "MOBILE",
    "appVersion": "2.1.0",
    "ipAddress": "192.168.1.100"
},
"rememberMe": true
}'
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"tokenType": "Bearer",
"expiresIn": 3600,
"userId": "USR_001_20241201_001",
"userProfile": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@email.com",
    "verificationLevel": "FULL"
},
"permissions": [
    "READ_ACCOUNT",
    "WRITE_TRANSACTIONS",
    "MANAGE_PROFILE"
],
"requiresMFA": false,
"message": "Login successful"
}

Request Password Reset

Initiates password reset workflow by sending recovery instructions to verified email address

Request

POST
/v1/users/password/reset
curl -X POST https://api.adiba.app/v1/users/password/reset \
  -H "Authorization: Bearer {token}" \
  -d '{
"email": "john.doe@email.com",
"username": "john.doe"
}'
{
"status": "SUCCESS",
"message": "Password reset instructions sent to your email",
"resetTokenExpiry": "2024-12-01T13:30:00Z",
"emailSent": true
}

Confirm Password Reset

Validates reset token and allows users to set new password with security validation

Request

POST
/v1/users/password/confirm
curl -X POST https://api.adiba.app/v1/users/password/confirm \
  -H "Authorization: Bearer {token}" \
  -d '{
"resetToken": "RESET_001_20241201_001",
"newPassword": "NewSecurePass456!",
"confirmPassword": "NewSecurePass456!"
}'
{
"status": "SUCCESS",
"message": "Password changed successfully",
"passwordChangedAt": "2024-12-01T12:45:00Z",
"sessionsInvalidated": 3
}

Refresh Access Token

Generates new access tokens using valid refresh tokens for session maintenance

Request

POST
/v1/users/token/refresh
curl -X POST https://api.adiba.app/v1/users/token/refresh \
  -H "Authorization: Bearer {token}" \
  -d '{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"deviceId": "DEV_001_20241201_001"
}'
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"tokenType": "Bearer",
"expiresIn": 3600,
"userId": "USR_001_20241201_001",
"refreshedAt": "2024-12-01T12:50:00Z",
"message": "Token refreshed successfully"
}

User Logout / Revoke Token

Securely terminates user sessions by invalidating access and refresh tokens

Request

POST
/v1/users/token/revoke
curl -X POST https://api.adiba.app/v1/users/token/revoke \
  -H "Authorization: Bearer {token}" \
  -d '{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"deviceId": "DEV_001_20241201_001"
}'
{
"status": "SUCCESS",
"message": "Logout successful. All sessions terminated.",
"revokedAt": "2024-12-01T13:00:00Z",
"tokensRevoked": 2,
"sessionEnded": true
}

Was this page helpful?