-
Notifications
You must be signed in to change notification settings - Fork 0
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
[#44] [#43] [Integrate] [Backend] As a user, I can refresh my token when it's expired #106
[#44] [#43] [Integrate] [Backend] As a user, I can refresh my token when it's expired #106
Conversation
🧛 shared Code Coverage:
|
File | Coverage |
---|---|
NetworkDataSource.kt |
100.00% |
RefreshTokenType.kt |
57.32% |
TokenizedNetworkClient.kt |
96.81% |
Modified Files Not Found In Coverage Report:
NetworkDataSourceTest.kt
NetworkModule.kt
TokenizedNetworkClientTest.kt
Codebase cunningly covered by count Shroud 🧛
Generated by 🚫 Danger
54db60f
to
2fc5af9
Compare
0305c46
to
3da38f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a tiny suggestion left, rest lgtm
|
||
@Serializable | ||
data class RefreshTokenInput( | ||
@SerialName("grant_type") val grantType: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blyscuit It would be better if we add more line breaks for easier readability, what do you think?
@SerialName("grant_type") val grantType: String, | |
@SerialName("grant_type") | |
val grantType: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a conversation with @minhnimble long time ago, I don't remember the PR. We concluded that we will use this format in this project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blyscuit @doannimble this is the conversation. In the end, it was for showing the relationship between the attribute and the SerialName
annotation better, especially in a long list of attributes that don't have SerialName
and only 1 or 2 attributes need it 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@minhnimble @doannimble Do we have this convention on the Kotlin page, or maybe there was a discussion on the Android chapter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this one most, but I had no valid argument for it, just preference. ❤️
class PaginationMetaApiModel(
val page: Int,
val pages: Int,
@SerialName("page_size")
val pageSize: Int,
val records: Int
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@suho @blyscuit @doannimble actually from our Compass, there is an inspired guideline from Ribot that mention about this annotation case for fields as follow:
Annotations applying to fields should be listed on the same line, unless the line reaches the maximum line length.
-> Hope that clear you guys confusion if any 🙏 And maybe we can create a PR to bring this convention to our Compass for transparency 😁
2fc5af9
to
d664cdc
Compare
iosApp/Survey/Sources/Presentation/Views/FadePaginationView.swift
Outdated
Show resolved
Hide resolved
3da38f0
to
9c2d271
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good from me 🚀
…tegration [#19] [Integrate] As a user, I can see Survey selection page
9c2d271
to
0b64003
Compare
|
||
@Serializable | ||
data class RefreshTokenInput( | ||
@SerialName("grant_type") val grantType: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@minhnimble @doannimble Do we have this convention on the Kotlin page, or maybe there was a discussion on the Android chapter?
|
||
@Serializable | ||
data class RefreshTokenInput( | ||
@SerialName("grant_type") val grantType: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened
When API returns token expired, call
/api/v1/oauth/token
to refresh token before calling the API again.Insight
Ktor.Auth.refreshTokens
.RefreshTokenType
.Proof Of Work