Skip to content

Commit

Permalink
Check authentication during pre-processing. (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsolman authored and erikzhang committed Mar 12, 2019
1 parent eb7052a commit d33ceb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions RpcSecurity/RpcSecurity.cs
Expand Up @@ -16,12 +16,12 @@ public override void Configure()

public void PreProcess(HttpContext context, string method, JArray _params)
{
if (!CheckAuth(context) || Settings.Default.DisabledMethods.Contains(method))
throw new RpcException(-400, "Access denied");
}

public JObject OnProcess(HttpContext context, string method, JArray _params)
{
if (!CheckAuth(context) || Settings.Default.DisabledMethods.Contains(method))
throw new RpcException(-400, "Access denied");
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions RpcSecurity/RpcSecurity.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>2.9.4</Version>
<Version>2.10.0</Version>
<TargetFrameworks>netstandard2.0;net47</TargetFrameworks>
<RootNamespace>Neo.Plugins</RootNamespace>
</PropertyGroup>
Expand All @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="2.9.4" />
<PackageReference Include="Neo" Version="2.10.0" />
</ItemGroup>

</Project>

0 comments on commit d33ceb5

Please sign in to comment.