Skip to content

Commit b0194e3

Browse files
committed
modified CheckTokenStatus method
1 parent c9a142b commit b0194e3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

OAuthTokenGenerator/OAuthTokenGenerator.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,9 @@ public OAuthTokenGenerator(HttpClient httpClient)
4242

4343
public bool CheckTokenStatus(string accessToken)
4444
{
45-
bool tokenExpired = false;
4645
var handler = new JwtSecurityTokenHandler();
4746
var authTokenJWT = handler.ReadJwtToken(accessToken);
48-
if (authTokenJWT?.ValidTo < DateTime.UtcNow)
49-
{
50-
tokenExpired = true;
51-
}
52-
return tokenExpired;
47+
return authTokenJWT?.ValidTo < DateTime.UtcNow;
5348
}
5449
}
5550
}

0 commit comments

Comments
 (0)