public IDictionary <string, string> ValidateToken(Action <TokenValidationParameters> tokenValidationParameters, string encryptionKey, string cookieToken) { var defaultEncryptionKey = _cryptographySwitch.Case(encryptionKey); if (_jsonWebTokenService.TryParseToken(cookieToken, defaultEncryptionKey.Password, tokenValidationParameters, Encoding.UTF8, out var claims)) { return(claims); } return(null); }