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

feat: support refresh service #581

Merged
merged 8 commits into from
Dec 22, 2023

Conversation

ilya-korotya
Copy link
Contributor

@ilya-korotya ilya-korotya commented Dec 14, 2023

We have recently implemented a refresh service for short-lived credentials. If a credential includes a refreshService field, clients can now use this service to refresh credentials that have expired.

Typical Use Case:

  1. A user obtains a credential for their Ethereum (ETH) balance. We do not issue long-term balance credentials due to the rapid fluctuation in balances.
  2. The issued balance credential expires after 5 minutes. Before expiration, the user can utilize this credential.
  3. After expiration, instead of requesting a new balance credential from the issuer, the user can simply refresh the existing credential using the refresh service.

For more details, please refer to our internal documentation: Refresh Service Documentation.

Link to the refresh service (⚠️ integration with the issuer-node is pending): GitHub - Refresh Service.
Integration with the issuer-node is ready on refresh service side: 0xPolygonID/refresh-service#3

@ilya-korotya ilya-korotya requested a review from a team as a code owner December 14, 2023 19:28
@ilya-korotya ilya-korotya changed the title Support refresh service feat: support refresh service Dec 14, 2023
@ilya-korotya ilya-korotya self-assigned this Dec 14, 2023
Copy link
Contributor

@javip97 javip97 left a comment

Choose a reason for hiding this comment

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

Nice Job! Some minor comments

return nil
},
// check if refresh service has supported type
func() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

If RefreshService is set, expiration should be mandatory in that case, right? I'm missing that validation here

Taken from the docs: "Also, the issuer should set expiration field"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right. I will fix.

Copy link
Contributor

@martinsaporiti martinsaporiti left a comment

Choose a reason for hiding this comment

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

LGTM, nice job @ilya-korotya !

@javip97 javip97 self-requested a review December 15, 2023 09:18
Copy link
Contributor

@javip97 javip97 left a comment

Choose a reason for hiding this comment

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

LGTM

@martinsaporiti martinsaporiti merged commit ce529dd into develop Dec 22, 2023
2 checks passed
@martinsaporiti martinsaporiti deleted the feature/support-refresh-service branch December 22, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants