Skip to content

Commit

Permalink
Add IsEncryptedMessage() Extension method
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jul 5, 2015
1 parent fb08f5c commit 9223ac8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
Binary file modified lib/ServiceStack.Client.dll
Binary file not shown.
Binary file modified lib/ServiceStack.Common.dll
Binary file not shown.
Binary file modified lib/ServiceStack.Interfaces.dll
Binary file not shown.
10 changes: 9 additions & 1 deletion src/ServiceStack/EncryptedMessagesFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.Net;
using ServiceStack.Auth;
using ServiceStack.Text;
using System.Security.Cryptography;
using ServiceStack.Web;
Expand Down Expand Up @@ -156,4 +155,13 @@ public static void WriteEncryptedError(IRequest req, byte[] aesKey, byte[] iv, E
req.Response.EndRequest();
}
}

public static class EncryptedMessagesFeatureExtensions
{
public static bool IsEncryptedMessage(this IRequest req)
{
return req.Items.ContainsKey(EncryptedMessagesFeature.RequestItemsAesKey)
&& req.Items.ContainsKey(EncryptedMessagesFeature.RequestItemsIv);
}
}
}
1 change: 1 addition & 0 deletions tests/RazorRockstars.Web/RazorRockstars.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
<None Include="Pages\_Layout.shtml" />
<None Include="Pages\Dir\_Layout.shtml" />
<EmbeddedResource Include="static-root-embedded.txt" />
<Content Include="sqlite3.dll" />
<Content Include="static-root.txt" />
<Content Include="Views\Shared\HtmlReport.cshtml" />
<Content Include="Views\Shared\Empty.cshtml" />
Expand Down

0 comments on commit 9223ac8

Please sign in to comment.