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

Prepared Retrofit realization for sending encrypted messages through … #1619

Merged
merged 3 commits into from
Dec 21, 2021

Conversation

DenBond7
Copy link
Collaborator

…the web portal.| #1615

This PR added Retrofit realization for sending encrypted messages through the web portal

close #1615


Tests (delete all except exactly one):

  • Does not need tests (refactor only, docs or internal changes)

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities

IvanPizhenko
IvanPizhenko previously approved these changes Dec 21, 2021
Copy link
Contributor

@IvanPizhenko IvanPizhenko left a comment

Choose a reason for hiding this comment

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

Looks good in overall, but I suggest small changes in parameter naming. See my comments.

@@ -143,7 +149,7 @@ interface ApiService {
* @param body POJO model for requests
*/
@POST(BuildConfig.API_URL + "account/login")
suspend fun postLogin(@Body body: LoginModel, @Header("Authorization") tokenId: String):
suspend fun postLogin(@Body body: LoginModel, @Header("Authorization") idToken: String):
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rename here and in other methods of this class idToken into authorization, because it actually contains not only token itself but the whole content of the header.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree 👍

@POST("https://fes.{domain}/api/v1/message/new-reply-token")
suspend fun getReplyTokenForPasswordProtectedMsg(
@Path("domain") domain: String,
@Header("Authorization") idToken: String
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above - rename

@POST("https://fes.{domain}/api/v1/message")
suspend fun uploadPasswordProtectedMsgToWebPortal(
@Path("domain") domain: String,
@Header("Authorization") idToken: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above - rename

@tomholub tomholub merged commit 022c649 into master Dec 21, 2021
@tomholub tomholub deleted the issue_1615_retrofit_for_password_encrypted_msgs branch December 21, 2021 22:11
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.

prepare API model / client class for sending through web portal
3 participants