From 2d260cec1a28c277fdfff888caa969ce367fe004 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Thu, 21 Nov 2024 23:28:18 +1100 Subject: [PATCH] fix incorrect as usage in GetAuthenticationTimeEpoch --- src/IdentityServer/Extensions/PrincipalExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IdentityServer/Extensions/PrincipalExtensions.cs b/src/IdentityServer/Extensions/PrincipalExtensions.cs index 634a9ee5d..5abd90487 100644 --- a/src/IdentityServer/Extensions/PrincipalExtensions.cs +++ b/src/IdentityServer/Extensions/PrincipalExtensions.cs @@ -46,7 +46,7 @@ public static long GetAuthenticationTimeEpoch(this IPrincipal principal) [DebuggerStepThrough] public static long GetAuthenticationTimeEpoch(this IIdentity identity) { - var id = identity as ClaimsIdentity; + var id = (ClaimsIdentity)identity; var claim = id.FindFirst(JwtClaimTypes.AuthenticationTime); if (claim == null) throw new InvalidOperationException("auth_time is missing.");