Skip to content

Commit 32eaddb

Browse files
committed
Update
1 parent 4f9e922 commit 32eaddb

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/Identity/Core/src/SignInManagerMetrics.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ internal void AuthenticateSignIn(string userType, string authenticationScheme, S
6565
var tags = new TagList
6666
{
6767
{ "aspnetcore.identity.user_type", userType },
68-
{ "aspnetcore.identity.authentication_scheme", authenticationScheme },
68+
{ "aspnetcore.authentication.scheme", authenticationScheme },
6969
{ "aspnetcore.identity.sign_in.type", GetSignInType(signInType) },
7070
};
7171
AddIsPersistent(ref tags, isPersistent);
@@ -86,7 +86,7 @@ internal void SignInUserPrincipal(string userType, string authenticationScheme,
8686
var tags = new TagList
8787
{
8888
{ "aspnetcore.identity.user_type", userType },
89-
{ "aspnetcore.identity.authentication_scheme", authenticationScheme },
89+
{ "aspnetcore.authentication.scheme", authenticationScheme },
9090
};
9191
AddIsPersistent(ref tags, isPersistent);
9292
AddErrorTag(ref tags, exception);
@@ -104,7 +104,7 @@ internal void SignOutUserPrincipal(string userType, string authenticationScheme,
104104
var tags = new TagList
105105
{
106106
{ "aspnetcore.identity.user_type", userType },
107-
{ "aspnetcore.identity.authentication_scheme", authenticationScheme },
107+
{ "aspnetcore.authentication.scheme", authenticationScheme },
108108
};
109109
AddErrorTag(ref tags, exception);
110110

@@ -121,7 +121,7 @@ internal void RememberTwoFactorClient(string userType, string authenticationSche
121121
var tags = new TagList
122122
{
123123
{ "aspnetcore.identity.user_type", userType },
124-
{ "aspnetcore.identity.authentication_scheme", authenticationScheme }
124+
{ "aspnetcore.authentication.scheme", authenticationScheme }
125125
};
126126
AddErrorTag(ref tags, exception);
127127

@@ -138,7 +138,7 @@ internal void ForgetTwoFactorClient(string userType, string authenticationScheme
138138
var tags = new TagList
139139
{
140140
{ "aspnetcore.identity.user_type", userType },
141-
{ "aspnetcore.identity.authentication_scheme", authenticationScheme }
141+
{ "aspnetcore.authentication.scheme", authenticationScheme }
142142
};
143143
AddErrorTag(ref tags, exception);
144144

@@ -154,7 +154,7 @@ private static void AddIsPersistent(ref TagList tags, bool? isPersistent)
154154
{
155155
if (isPersistent != null)
156156
{
157-
tags.Add("aspnetcore.identity.sign_in.is_persistent", isPersistent.Value);
157+
tags.Add("aspnetcore.authentication.is_persistent", isPersistent.Value);
158158
}
159159
}
160160

src/Identity/test/Identity.Test/SignInManagerTest.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public async Task PasswordSignInReturnsLockedOutWhenLockedOut()
7171
m => MetricsHelpers.AssertHasDurationAndContainsTags(m.Value, m.Tags,
7272
[
7373
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
74-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
74+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
7575
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.type", "password"),
7676
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.is_persistent", false),
7777
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.result", "locked_out"),
@@ -395,7 +395,7 @@ public async Task ExternalSignInRequiresVerificationIfNotBypassed(bool bypass)
395395
m => MetricsHelpers.AssertHasDurationAndContainsTags(m.Value, m.Tags,
396396
[
397397
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
398-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
398+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
399399
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.type", "external"),
400400
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.is_persistent", false),
401401
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.result", "success"),
@@ -404,7 +404,7 @@ public async Task ExternalSignInRequiresVerificationIfNotBypassed(bool bypass)
404404
m => MetricsHelpers.AssertContainsTags(m.Tags,
405405
[
406406
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
407-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
407+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
408408
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.is_persistent", false),
409409
]));
410410
}
@@ -414,7 +414,7 @@ public async Task ExternalSignInRequiresVerificationIfNotBypassed(bool bypass)
414414
m => MetricsHelpers.AssertHasDurationAndContainsTags(m.Value, m.Tags,
415415
[
416416
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
417-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
417+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
418418
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.type", "external"),
419419
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.is_persistent", false),
420420
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.result", "requires_two_factor"),
@@ -472,7 +472,7 @@ public async Task CanPasskeySignIn()
472472
m => MetricsHelpers.AssertHasDurationAndContainsTags(m.Value, m.Tags,
473473
[
474474
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
475-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
475+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
476476
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.type", "passkey"),
477477
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.is_persistent", false),
478478
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.result", "success"),
@@ -481,7 +481,7 @@ public async Task CanPasskeySignIn()
481481
m => MetricsHelpers.AssertContainsTags(m.Tags,
482482
[
483483
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
484-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
484+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
485485
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.is_persistent", false),
486486
]));
487487
}
@@ -800,7 +800,7 @@ public async Task SignInAsync_Failure()
800800
m => MetricsHelpers.AssertContainsTags(m.Tags,
801801
[
802802
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
803-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
803+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
804804
KeyValuePair.Create<string, object>("error.type", "System.InvalidOperationException"),
805805
]));
806806
}
@@ -858,7 +858,7 @@ public async Task CanResignIn(bool isPersistent, bool externalLogin)
858858
m => MetricsHelpers.AssertHasDurationAndContainsTags(m.Value, m.Tags,
859859
[
860860
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
861-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
861+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
862862
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.is_persistent", isPersistent),
863863
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.result", "success"),
864864
]));
@@ -895,7 +895,7 @@ public async Task ResignInNoOpsAndLogsErrorIfNotAuthenticated()
895895
m => MetricsHelpers.AssertHasDurationAndContainsTags(m.Value, m.Tags,
896896
[
897897
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
898-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
898+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
899899
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.result", "failure"),
900900
]));
901901
Assert.Empty(signInUserPrincipal.GetMeasurementSnapshot());
@@ -1069,7 +1069,7 @@ public async Task RememberClientStoresUserId()
10691069
m => MetricsHelpers.AssertContainsTags(m.Tags,
10701070
[
10711071
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
1072-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.TwoFactorRememberMe"),
1072+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.TwoFactorRememberMe"),
10731073
]));
10741074
}
10751075

@@ -1101,7 +1101,7 @@ public async Task ForgetTwoFactorClient()
11011101
m => MetricsHelpers.AssertContainsTags(m.Tags,
11021102
[
11031103
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
1104-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.TwoFactorRememberMe"),
1104+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.TwoFactorRememberMe"),
11051105
KeyValuePair.Create<string, object>("error.type", "System.InvalidOperationException"),
11061106
]));
11071107
}
@@ -1172,7 +1172,7 @@ public async Task SignOutCallsContextResponseSignOut_Success()
11721172
m => MetricsHelpers.AssertContainsTags(m.Tags,
11731173
[
11741174
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
1175-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
1175+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
11761176
]));
11771177
}
11781178

@@ -1197,7 +1197,7 @@ public async Task SignOutCallsContextResponseSignOut_Failure()
11971197
m => MetricsHelpers.AssertContainsTags(m.Tags,
11981198
[
11991199
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
1200-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
1200+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
12011201
KeyValuePair.Create<string, object>("error.type", "System.InvalidOperationException"),
12021202
]));
12031203
}
@@ -1233,7 +1233,7 @@ public async Task PasswordSignInFailsWithWrongPassword()
12331233
m => MetricsHelpers.AssertHasDurationAndContainsTags(m.Value, m.Tags,
12341234
[
12351235
KeyValuePair.Create<string, object>("aspnetcore.identity.user_type", "Microsoft.AspNetCore.Identity.Test.PocoUser"),
1236-
KeyValuePair.Create<string, object>("aspnetcore.identity.authentication_scheme", "Identity.Application"),
1236+
KeyValuePair.Create<string, object>("aspnetcore.authentication.scheme", "Identity.Application"),
12371237
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.is_persistent", false),
12381238
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.result", "failure"),
12391239
KeyValuePair.Create<string, object>("aspnetcore.identity.sign_in.type", "password"),

0 commit comments

Comments
 (0)