Skip to content

Commit ffbdfd9

Browse files
committed
fix it
1 parent f9062d3 commit ffbdfd9

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace OpenShock.Common.Authentication;
2+
3+
public class OpenShockAuthClaims
4+
{
5+
public const string ApiTokenId = "openshock.apiTokenId";
6+
public const string ApiTokenPermission = "openshock.ApiTokenPermission";
7+
public const string HubId = "openshock.hubId";
8+
}

Common.ASPNET/Utils/OpenShockEnricher.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
using System.Security.Claims;
22
using Microsoft.Net.Http.Headers;
3+
using OpenShock.Common.Authentication;
4+
using OpenShock.Common.Utils;
35
using Serilog;
46
using Serilog.Configuration;
57
using Serilog.Core;
68
using Serilog.Events;
79

8-
namespace OpenShock.Common.Utils;
10+
namespace OpenShock.Common.ASPNET.Utils;
911

1012
public sealed class OpenShockEnricher : ILogEventEnricher
1113
{
@@ -49,7 +51,7 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
4951
}
5052
}
5153

52-
private void AddVar(LogEvent logEvent, string key, string value)
54+
private static void AddVar(LogEvent logEvent, string key, string value)
5355
{
5456
var propertyId = new LogEventProperty(key, new ScalarValue(value));
5557
logEvent.AddOrUpdateProperty(propertyId);

0 commit comments

Comments
 (0)