-
Notifications
You must be signed in to change notification settings - Fork 173
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
Added Identity Token to TokenRefreshEventArgs #367
Conversation
This change allows updating the identity token cached at the client with the latest identity token coming from token renewal
Thanks will have a look after holidays. |
Thank you for taking this into consideration @leastprivilege Enjoy your holidays ✌️ |
Hey @leastprivilege, this is just a friendly reminder for you to check this PR. I wanted to avoid having to fork the repo for such a small tweak. Thank you in advance for your consideration! |
@@ -17,10 +17,11 @@ public class TokenRefreshedEventArgs : EventArgs | |||
/// <param name="accessToken">The access token.</param> | |||
/// <param name="refreshToken">The refresh token.</param> | |||
/// <param name="expiresIn">The expires in.</param> | |||
public TokenRefreshedEventArgs(string accessToken, string refreshToken, int expiresIn) | |||
public TokenRefreshedEventArgs(string accessToken, string refreshToken, string identityToken, int expiresIn) |
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.
The problem is that this is introducing a breaking change because you changed the signature.
I would prefer to move identityToken to the end of the param list and make it optional.
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.
Understood. New changes pushed
Didn't mean to remove @brockallen from the reviewers. Not sure how that happened and I don't have permission to add him back |
@leastprivilege thanks for the review. |
This change allows updating the identity token cached at the client with the latest identity token coming from token renewal.
The motivation for this change is that claims can change during the runtime of the identity client (in my case, it's user claims related to permissions).
The alternative approach would be to call
/userinfo
endpoint, which we consider an avoidable overhead.