-
Notifications
You must be signed in to change notification settings - Fork 0
Authentication
URL: /api/login
Method: POST
Description: This API endpoint handles user login, including CAPTCHA validation, throttling, and two-factor authentication if enabled.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
client_email |
String | Required | The email address of the client. |
client_password |
String | Required | The password of the client. |
g-recaptcha-response |
String | Optional (Required if RECAPTCHA_SITE_KEY is set) |
CAPTCHA response token for validation. |
{
"success": true,
"message": "You have logged in successfully to Auto Faveo Licenser",
"data": {
"token": "<access_token>",
"user": {
"id": 1,
"email": "user@example.com",
"name": "John Doe"
}
}
}URL: /api/admin/logout/{user_id}
Method: POST
Description: This API endpoint revokes the OAuth access tokens for a specified user and marks them as expired.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
user_id |
Integer | Required | The unique identifier of the user |
{
"success": true,
"message": "You have has logged out successfully from Auto Faveo Licenser",
"data": 1,
}URL: /api/forgot
Method: POST
Description: This API endpoint handles the password reset request by validating the provided email, checking rate limits, generating a reset token, and sending a reset email if the email is associated with a user.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
admin_email |
String | Required | The email address of the user requesting a password reset. |
g-recaptcha-response |
String | Optional (Required if RECAPTCHA_SITE_KEY is set) |
CAPTCHA response token for validation. |
{
"success": true,
"message": "Password reset link has been sent to this email",
"data": "",
}URL: /api/reset
Method: POST
Description: This API endpoint allows users to reset their password using a provided reset token. It validates the password, token, and CAPTCHA response, then updates the user's password and removes the reset token.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
password |
String | Required | The new password for the user. Must be at least 8 characters long, contain at least one lowercase letter, one uppercase letter, one digit, and one special character. |
password_confirmation |
String | Required | Confirmation of the new password. Must match the password field. |
token |
String | Required | The password reset token received via email. |
g-recaptcha-response |
String | Optional (Required if RECAPTCHA_SITE_KEY is set) |
CAPTCHA response token for validation. |
{
"success": true,
"message": "Your password has been reset!",
"data": 1
}URL: /api/save-debug-value
Method: POST
Description: Updates the debugger settings for the application. This endpoint toggles debugging mode, updates the .env file, and manages caching based on the provided settings.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
debug |
Boolean | Optional | Indicates whether to enable or disable debugging. Defaults to false if not provided. |
user_id |
String | Required | The unique identifier of the user for whom the debug token should be cached. |
Authorization |
String | Required | Bearer token for authorization. Must be included in the request headers. |
{
"success": true,
"message": "Value has been updated successfully",
"data": {
"debug": true,
"app_url": "http://example.com"
}
}URL: /api/recaptchaStatus
Method: GET
Description: Retrieves the current status of reCAPTCHA integration and provides the reCAPTCHA site key if configured.
This endpoint does not require any parameters.
{
"recaptcha_status": 1,
"site_key": "kjwbf768763hhjaasbuii37812yhk"
}URL: /api/verify-recovery-code
Method: POST
Description: Verifies a recovery code for user authentication and logs the user in if the code is valid.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
recovery_code |
string | Required | The recovery code used for authentication. |
g-recaptcha-response |
string | Optional (Required if RECAPTCHA_SITE_KEY is set) |
The reCAPTCHA response used for verification. |
PPAuth |
array | Required | Contains authentication details where the key is used to retrieve session data. |
{
"success": true,
"message": "You have logged in successfully to Auto Faveo Licenser",
"data": {
"token": "<access_token>",
"user": {
"id": 1,
"email": "user@example.com",
"name": "John Doe"
}
}
}URL: /api/verify2fa
Method: POST
Description: Verifies the Two-Factor Authentication (2FA) code for a user and logs them in if the code is valid.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
totp |
string | Required | The One-Time Password (OTP) generated by the user's 2FA application. |
g-recaptcha-response |
string | Optional (Required if RECAPTCHA_SITE_KEY is set) |
The reCAPTCHA response used for verification. |
PPAuth |
array | Required | Contains authentication details where the key is used to retrieve session data. |
{
"success": true,
"message": "You have logged in successfully to Auto Faveo Licenser",
"data": {
"token": "<access_token>",
"user": {
"id": 1,
"email": "user@example.com",
"name": "John Doe"
}
}
}