RUAL Documentation

Authentication APIs

Below is a comprehensive list of authentication-related APIs that serve various purposes such as user login, password reset requests, and two-factor authentication validation for your specified token.

auth/login POST

Utilize this API to initiate an authentication process for any user account within the cluster.

Key Type Example
username string "joe"
password string "*********"
{ "access_token": "1Z1105da2bac3190b757792066e83f6f3aZ0efa92ae3aebdd6079fa2f328f4dfe2a", "expiry": 1708195948, "expiry_renew": 1209678, "verified": false, "2fa": [ "mobile", "totp", "otp" ], "default_2fa": "mobile", "user": { "username": "joe", "language": "en", "firstname": "Joe", "lastname": "Do", "code": "XXX", "_meta": { "guid": "39336c0c7cec1c89f617ed704b34c2ad39336c0c7cec1c89f617ed704b34c2ad" } }, "ip": "127.0.0.1" }
{ "success": false, "error": "ERROR_KEY" }

If a token is unverified, you can request a 2FA SMS code using this API. This request is automatically triggered when the user's default 2FA method is configured as mobile.

Key Type Example
access_token string "1Z1105da2bac3190b757792066e83f6f3aZ0efa92ae3aebdd6079fa2f328f4dfe2a"
{ "verified": true }
{ "verified": false }

If a token is unverified, you can validate it by utilizing this API with the user-provided 2FA token.

Key Type Example
access_token string "1Z1105da2bac3190b757792066e83f6f3aZ0efa92ae3aebdd6079fa2f328f4dfe2a"
token string "48 01 94"
{ "verified": true }
{ "verified": false }

If a token is unverified, you can validate it by utilizing this API with the user-provided 2FA token.

Key Type Example
access_token string "1Z1105da2bac3190b757792066e83f6f3aZ0efa92ae3aebdd6079fa2f328f4dfe2a"
token string "25890226bfe4de7952bcc8f4268efb14"
{ "verified": true }
{ "verified": false }

If a token is unverified, you can validate it by utilizing this API with the user-provided 2FA token.

Key Type Example
access_token string "1Z1105da2bac3190b757792066e83f6f3aZ0efa92ae3aebdd6079fa2f328f4dfe2a"
token string "692849"
{ "verified": true }
{ "verified": false }

With this API you can invalidate the current token and logout the user.

Key Type Example
authorization string "Bearer 1Z1105da2bac3190b757792066e83f6f3aZ0efa92ae3aebdd6079fa2f328f4dfe2a"
{ "logout": true }
{ "success": false, "error": "ERROR_KEY" }