Skip to content
This repository was archived by the owner on Dec 24, 2020. It is now read-only.

Commit 23c4e6d

Browse files
committed
Replace DNXCORE50 by NETSTANDARD1_3
1 parent 9550cab commit 23c4e6d

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

src/AspNet.Security.OAuth.Introspection/OAuthIntrospectionHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ protected virtual Task<AuthenticationTicket> CreateTicketAsync(JObject payload)
203203
continue;
204204

205205
case OAuthIntrospectionConstants.Claims.IssuedAt: {
206-
#if DNXCORE50
206+
#if NETSTANDARD1_3
207207
// Convert the UNIX timestamp to a DateTimeOffset.
208208
properties.IssuedUtc = DateTimeOffset.FromUnixTimeSeconds((long) property.Value);
209209
#else
@@ -216,7 +216,7 @@ protected virtual Task<AuthenticationTicket> CreateTicketAsync(JObject payload)
216216

217217

218218
case OAuthIntrospectionConstants.Claims.ExpiresAt: {
219-
#if DNXCORE50
219+
#if NETSTANDARD1_3
220220
// Convert the UNIX timestamp to a DateTimeOffset.
221221
properties.ExpiresUtc = DateTimeOffset.FromUnixTimeSeconds((long) property.Value);
222222
#else

src/Owin.Security.OAuth.Introspection/OAuthIntrospectionHandler.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,26 +210,15 @@ protected virtual Task<AuthenticationTicket> CreateTicketAsync(JObject payload)
210210
continue;
211211

212212
case OAuthIntrospectionConstants.Claims.IssuedAt: {
213-
#if DNXCORE50
214-
// Convert the UNIX timestamp to a DateTimeOffset.
215-
properties.IssuedUtc = DateTimeOffset.FromUnixTimeSeconds((long) property.Value);
216-
#else
217213
properties.IssuedUtc = new DateTimeOffset(1970, 1, 1, 0, 0, 0, 0, TimeSpan.Zero) +
218214
TimeSpan.FromSeconds((long) property.Value);
219-
#endif
220-
221215
continue;
222216
}
223217

224218

225219
case OAuthIntrospectionConstants.Claims.ExpiresAt: {
226-
#if DNXCORE50
227-
// Convert the UNIX timestamp to a DateTimeOffset.
228-
properties.ExpiresUtc = DateTimeOffset.FromUnixTimeSeconds((long) property.Value);
229-
#else
230220
properties.ExpiresUtc = new DateTimeOffset(1970, 1, 1, 0, 0, 0, 0, TimeSpan.Zero) +
231221
TimeSpan.FromSeconds((long) property.Value);
232-
#endif
233222

234223
continue;
235224
}

0 commit comments

Comments
 (0)