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

API Contracts for /qr-code-auth Endpoint #134

Merged
merged 18 commits into from
Jun 18, 2023
Merged

Conversation

heyrandhir
Copy link
Contributor

@heyrandhir heyrandhir commented Jun 4, 2023

The PR adds API contracts for the QrCodeAuth collection, which includes three endpoints:

  • POST /qr-code-auth to create a new authentication document
  • GET /qr-code-auth to retrieve all the authentication documents belonging to a specified user
  • PATCH /qr-code-auth to update the is_authorized field of an existing qr-code-auth document for the specified user.

@heyrandhir heyrandhir self-assigned this Jun 4, 2023
Copy link
Contributor

@shreya-mishra shreya-mishra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will you please change the origin to qr-code-api-contract this branch ?

@heyrandhir heyrandhir changed the base branch from main to qr-code-api-contract June 4, 2023 11:26
@heyrandhir
Copy link
Contributor Author

will you please change the origin to qr-code-api-contract this branch ?

Done @shreya-mishra , your branch is not up to date with the latest changes in the main branch. There are four file modifications that can be seen. To ensure that only the correct file changes are included in the pull request, please rebase your branch from the most recent main. Thank you.

@prakashchoudhary07
Copy link
Contributor

Why are events, monitor, and progress changes here?

@heyrandhir
Copy link
Contributor Author

Why are events, monitor, and progress changes here?

Since the target branch is not updated with the latest main we see those file changes. I have asked @shreya-mishra to take a latest pull from main to resolve this.

@heyrandhir heyrandhir changed the base branch from qr-code-api-contract to main June 6, 2023 02:34
qr-code-auth/README.md Outdated Show resolved Hide resolved
qr-code-auth/README.md Show resolved Hide resolved
qr-code-auth/README.md Show resolved Hide resolved
qr-code-auth/README.md Outdated Show resolved Hide resolved
qr-code-auth/README.md Outdated Show resolved Hide resolved
sakshambhatt
sakshambhatt previously approved these changes Jun 9, 2023
Copy link

@sakshambhatt sakshambhatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

shreya-mishra
shreya-mishra previously approved these changes Jun 10, 2023
qr-code-auth/README.md Outdated Show resolved Hide resolved
qr-code-auth/README.md Show resolved Hide resolved
Comment on lines 119 to 131
```json
{
"message": "String",
"data": {
"user_id": "String",
"device_info": "String",
"authorization_status": "String",
"access_token": "String"
}
}
```

- **Error Response:**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GET api returns data which has access token. And we can pass any users Id and get their access tokens right?
Then they will be able to login on behalf of the actual user?
Will it not be concerning?

Correct me if I am missing something please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shreya-mishra @sakshambhatt shall we remove access token from GET Response ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! sure we can do that

Copy link

@isVivek99 isVivek99 Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we are not going to store the accesstoken, i don't think we will be able to return it, on a get call.

qr-code-auth/README.md Show resolved Hide resolved
qr-code-auth/README.md Outdated Show resolved Hide resolved
isVivek99
isVivek99 previously approved these changes Jun 16, 2023
Copy link
Contributor

@shreya-mishra shreya-mishra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will work on route names later, in the second iteration.

qr-code-auth/README.md Outdated Show resolved Hide resolved
None
- **Query**

- user_id : Specifies the ID of the User whose authentication document will be retrieved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added user_id as well to filter the document on the basis of user_id since we don't have device_id stored in our database.

Copy link
Contributor

@prakashchoudhary07 prakashchoudhary07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants