Skip to content
This repository was archived by the owner on Feb 23, 2025. It is now read-only.

Commit 091357d

Browse files
Chrisleastprivilege
Chris
authored andcommitted
add DateTime property to refresh result (#70)
1 parent e058472 commit 091357d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/IdentityModel.OidcClient/OidcClient.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ public virtual async Task<RefreshTokenResult> RefreshTokenAsync(string refreshTo
307307
IdentityToken = response.IdentityToken,
308308
AccessToken = response.AccessToken,
309309
RefreshToken = response.RefreshToken,
310-
ExpiresIn = (int)response.ExpiresIn
310+
ExpiresIn = (int)response.ExpiresIn,
311+
AccessTokenExpiration = DateTime.Now.AddSeconds(response.ExpiresIn)
311312
};
312313
}
313314

src/IdentityModel.OidcClient/Results/RefreshTokenResult.cs

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44

5+
using System;
6+
57
namespace IdentityModel.OidcClient.Results
68
{
79
/// <summary>
@@ -41,5 +43,14 @@ public class RefreshTokenResult : Result
4143
/// The expires in.
4244
/// </value>
4345
public virtual int ExpiresIn { get; internal set; }
46+
47+
/// <summary>
48+
/// Gets or sets the access token expiration.
49+
/// </summary>
50+
/// <value>
51+
/// The access token expiration.
52+
/// </value>
53+
public virtual DateTime AccessTokenExpiration { get; internal set; }
54+
4455
}
4556
}

0 commit comments

Comments
 (0)