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

Support promise based tokenGetter in JwtHelperService #748

Merged
merged 5 commits into from
Dec 13, 2022
Merged

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Oct 25, 2022

Changes

tokenGetter is typed to be able to return a string or a promise. The interceptor can handle when tokenGetter returns a promise, but the JwtHelperService can not.

This PR updates the JwtHelperService in such a way that it can handle Promises.

Note that this does change the public API, but it's not to be considered a breaking change as we actualy fixing incorrect current behavior.

References

Closes #747

Checklist

@frederikprijck frederikprijck marked this pull request as ready for review December 12, 2022 16:37
@frederikprijck frederikprijck requested a review from a team as a code owner December 12, 2022 16:37
@frederikprijck frederikprijck enabled auto-merge (squash) December 12, 2022 16:37
@codecov
Copy link

codecov bot commented Dec 12, 2022

Codecov Report

Base: 85.71% // Head: 85.71% // No change to project coverage 👍

Coverage data is based on head (9fe1af4) compared to base (b79c495).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #748   +/-   ##
=======================================
  Coverage   85.71%   85.71%           
=======================================
  Files           2        2           
  Lines           7        7           
=======================================
  Hits            6        6           
  Misses          1        1           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@frederikprijck frederikprijck marked this pull request as draft December 12, 2022 16:41
@frederikprijck frederikprijck marked this pull request as ready for review December 12, 2022 17:23
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.

tokenGetter does not support Promise
2 participants