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

Added Identity Token to TokenRefreshEventArgs #367

Merged
merged 2 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Make Identity Token optional in TokenRefreshEventArgs to prevent brea…
…king changes
  • Loading branch information
fmgracias committed Sep 19, 2022
commit 8a4de5ce1e7426a08a91f0ff1397e8cf675be84f
2 changes: 1 addition & 1 deletion src/OidcClient/RefreshTokenDelegatingHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private async Task<bool> RefreshTokensAsync(CancellationToken cancellationToken)
{
try
{
del(this, new TokenRefreshedEventArgs(response.AccessToken, response.RefreshToken, response.IdentityToken, response.ExpiresIn));
del(this, new TokenRefreshedEventArgs(response.AccessToken, response.RefreshToken, response.ExpiresIn, response.IdentityToken));
}
catch { }
}
Expand Down
16 changes: 8 additions & 8 deletions src/OidcClient/TokenRefreshedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ 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, string identityToken, int expiresIn)
public TokenRefreshedEventArgs(string accessToken, string refreshToken, int expiresIn, string identityToken = null)
{
AccessToken = accessToken;
RefreshToken = refreshToken;
IdentityToken = identityToken;
ExpiresIn = expiresIn;
IdentityToken = identityToken;
}

/// <summary>
Expand All @@ -42,19 +42,19 @@ public TokenRefreshedEventArgs(string accessToken, string refreshToken, string i
public string RefreshToken { get; }

/// <summary>
/// Gets the identity token.
/// Gets or sets the expires in.
/// </summary>
/// <value>
/// The identity token.
/// The expires in.
/// </value>
public string IdentityToken { get; }
public int ExpiresIn { get; }

/// <summary>
/// Gets or sets the expires in.
/// Gets the identity token.
/// </summary>
/// <value>
/// The expires in.
/// The identity token.
/// </value>
public int ExpiresIn { get; }
public string IdentityToken { get; }
}
}