public static string GetClaimValue(string key) { try { var claim = UserClaims.FindFirst(key); return(claim != null ? claim.Value : string.Empty); } catch { return(string.Empty); } }