Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature-API] account_password_management: Verify Account and Password #7

Closed
Xiao75896453 opened this issue Aug 5, 2024 · 0 comments · Fixed by #20
Closed

[Feature-API] account_password_management: Verify Account and Password #7

Xiao75896453 opened this issue Aug 5, 2024 · 0 comments · Fixed by #20
Assignees
Labels
enhancement New feature or request

Comments

@Xiao75896453
Copy link
Owner

What problem does this feature solve?

Inputs:

A JSON payload containing the following fields:

  • "username": a string representing the username of the account being accessed.
  • "password": a string representing the password being used to access the account.

Output:

Returns a JSON payload containing the following field:

  • "success": a boolean field indicating the validity of the password provided for the given username, with "true" indicating that the password is correct and "false" indicating otherwise.
  • "reason": a string field indicating the reason if needed.

If the password verification fails five times, the user should wait one minute before attempting to verify the password again. The API should return the appropriate HTTP status code and message to indicate this situation.

What does the proposed feature look like?

Request

  • method: POST
  • endpoint: authentications/verifications

Parameters: (Name, Data Type, How to Get)

Request Body

{
  "username": str
  "password": str
}

Reponse

{
  "success": bool
  "reason": str | None
}

Success Example

{
  "success": True
  "reason": None
}

Fail: (Situation, HTTP Status Code)

  • Password is not correct : 401
  • Too many failed verification attempts : 401
  • Username not exists : 404
@Xiao75896453 Xiao75896453 added the enhancement New feature or request label Aug 5, 2024
@Xiao75896453 Xiao75896453 self-assigned this Aug 5, 2024
Xiao75896453 added a commit that referenced this issue Aug 5, 2024
…ment/verify_account

feat (account_password_management/authentication): Verify Account and Password #7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

1 participant