Skip to content

Commit 320f991

Browse files
committed
PasskeyOptions -> IdentityPasskeyOptions
1 parent 9b0676c commit 320f991

File tree

7 files changed

+34
-34
lines changed

7 files changed

+34
-34
lines changed

src/Identity/Core/src/PasskeyOptions.cs renamed to src/Identity/Core/src/IdentityPasskeyOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Identity;
66
/// <summary>
77
/// Specifies options for passkey requirements.
88
/// </summary>
9-
public class PasskeyOptions
9+
public class IdentityPasskeyOptions
1010
{
1111
/// <summary>
1212
/// Gets or sets the time that the browser should wait for the authenticator to provide a passkey.

src/Identity/Core/src/PasskeyHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ public sealed class PasskeyHandler<TUser> : IPasskeyHandler<TUser>
1818
where TUser : class
1919
{
2020
private readonly UserManager<TUser> _userManager;
21-
private readonly PasskeyOptions _options;
21+
private readonly IdentityPasskeyOptions _options;
2222

2323
/// <summary>
2424
/// Constructs a new <see cref="PasskeyHandler{TUser}"/> instance.
2525
/// </summary>
2626
/// <param name="userManager">The <see cref="UserManager{TUser}"/>.</param>
2727
/// <param name="options">The <see cref="IdentityOptions"/>.</param>
28-
public PasskeyHandler(UserManager<TUser> userManager, IOptions<PasskeyOptions> options)
28+
public PasskeyHandler(UserManager<TUser> userManager, IOptions<IdentityPasskeyOptions> options)
2929
{
3030
ArgumentNullException.ThrowIfNull(userManager);
3131
ArgumentNullException.ThrowIfNull(options);

src/Identity/Core/src/PublicAPI.Unshipped.txt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
11
#nullable enable
2+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions
3+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.AttestationConveyancePreference.get -> string?
4+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.AttestationConveyancePreference.set -> void
5+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.AuthenticatorAttachment.get -> string?
6+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.AuthenticatorAttachment.set -> void
7+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.AuthenticatorTimeout.get -> System.TimeSpan
8+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.AuthenticatorTimeout.set -> void
9+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.ChallengeSize.get -> int
10+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.ChallengeSize.set -> void
11+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.IdentityPasskeyOptions() -> void
12+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.IsAllowedAlgorithm.get -> System.Func<int, bool>?
13+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.IsAllowedAlgorithm.set -> void
14+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.ResidentKeyRequirement.get -> string?
15+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.ResidentKeyRequirement.set -> void
16+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.ServerDomain.get -> string?
17+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.ServerDomain.set -> void
18+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.UserVerificationRequirement.get -> string?
19+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.UserVerificationRequirement.set -> void
20+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.ValidateOrigin.get -> System.Func<Microsoft.AspNetCore.Identity.PasskeyOriginValidationContext!, System.Threading.Tasks.ValueTask<bool>>?
21+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.ValidateOrigin.set -> void
22+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.VerifyAttestationStatement.get -> System.Func<Microsoft.AspNetCore.Identity.PasskeyAttestationStatementVerificationContext!, System.Threading.Tasks.ValueTask<bool>>?
23+
Microsoft.AspNetCore.Identity.IdentityPasskeyOptions.VerifyAttestationStatement.set -> void
224
Microsoft.AspNetCore.Identity.IPasskeyHandler<TUser>
325
Microsoft.AspNetCore.Identity.IPasskeyHandler<TUser>.MakeCreationOptionsAsync(Microsoft.AspNetCore.Identity.PasskeyUserEntity! userEntity, Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.PasskeyCreationOptionsResult!>!
426
Microsoft.AspNetCore.Identity.IPasskeyHandler<TUser>.MakeRequestOptionsAsync(TUser? user, Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.PasskeyRequestOptionsResult!>!
@@ -51,31 +73,9 @@ Microsoft.AspNetCore.Identity.PasskeyException.PasskeyException(string! message,
5173
Microsoft.AspNetCore.Identity.PasskeyHandler<TUser>
5274
Microsoft.AspNetCore.Identity.PasskeyHandler<TUser>.MakeCreationOptionsAsync(Microsoft.AspNetCore.Identity.PasskeyUserEntity! userEntity, Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.PasskeyCreationOptionsResult!>!
5375
Microsoft.AspNetCore.Identity.PasskeyHandler<TUser>.MakeRequestOptionsAsync(TUser? user, Microsoft.AspNetCore.Http.HttpContext! httpContext) -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.PasskeyRequestOptionsResult!>!
54-
Microsoft.AspNetCore.Identity.PasskeyHandler<TUser>.PasskeyHandler(Microsoft.AspNetCore.Identity.UserManager<TUser!>! userManager, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.PasskeyOptions!>! options) -> void
76+
Microsoft.AspNetCore.Identity.PasskeyHandler<TUser>.PasskeyHandler(Microsoft.AspNetCore.Identity.UserManager<TUser!>! userManager, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityPasskeyOptions!>! options) -> void
5577
Microsoft.AspNetCore.Identity.PasskeyHandler<TUser>.PerformAssertionAsync(Microsoft.AspNetCore.Identity.PasskeyAssertionContext! context) -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.PasskeyAssertionResult<TUser!>!>!
5678
Microsoft.AspNetCore.Identity.PasskeyHandler<TUser>.PerformAttestationAsync(Microsoft.AspNetCore.Identity.PasskeyAttestationContext! context) -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.PasskeyAttestationResult!>!
57-
Microsoft.AspNetCore.Identity.PasskeyOptions
58-
Microsoft.AspNetCore.Identity.PasskeyOptions.AttestationConveyancePreference.get -> string?
59-
Microsoft.AspNetCore.Identity.PasskeyOptions.AttestationConveyancePreference.set -> void
60-
Microsoft.AspNetCore.Identity.PasskeyOptions.AuthenticatorAttachment.get -> string?
61-
Microsoft.AspNetCore.Identity.PasskeyOptions.AuthenticatorAttachment.set -> void
62-
Microsoft.AspNetCore.Identity.PasskeyOptions.AuthenticatorTimeout.get -> System.TimeSpan
63-
Microsoft.AspNetCore.Identity.PasskeyOptions.AuthenticatorTimeout.set -> void
64-
Microsoft.AspNetCore.Identity.PasskeyOptions.ChallengeSize.get -> int
65-
Microsoft.AspNetCore.Identity.PasskeyOptions.ChallengeSize.set -> void
66-
Microsoft.AspNetCore.Identity.PasskeyOptions.IsAllowedAlgorithm.get -> System.Func<int, bool>?
67-
Microsoft.AspNetCore.Identity.PasskeyOptions.IsAllowedAlgorithm.set -> void
68-
Microsoft.AspNetCore.Identity.PasskeyOptions.PasskeyOptions() -> void
69-
Microsoft.AspNetCore.Identity.PasskeyOptions.ResidentKeyRequirement.get -> string?
70-
Microsoft.AspNetCore.Identity.PasskeyOptions.ResidentKeyRequirement.set -> void
71-
Microsoft.AspNetCore.Identity.PasskeyOptions.ServerDomain.get -> string?
72-
Microsoft.AspNetCore.Identity.PasskeyOptions.ServerDomain.set -> void
73-
Microsoft.AspNetCore.Identity.PasskeyOptions.UserVerificationRequirement.get -> string?
74-
Microsoft.AspNetCore.Identity.PasskeyOptions.UserVerificationRequirement.set -> void
75-
Microsoft.AspNetCore.Identity.PasskeyOptions.ValidateOrigin.get -> System.Func<Microsoft.AspNetCore.Identity.PasskeyOriginValidationContext!, System.Threading.Tasks.ValueTask<bool>>?
76-
Microsoft.AspNetCore.Identity.PasskeyOptions.ValidateOrigin.set -> void
77-
Microsoft.AspNetCore.Identity.PasskeyOptions.VerifyAttestationStatement.get -> System.Func<Microsoft.AspNetCore.Identity.PasskeyAttestationStatementVerificationContext!, System.Threading.Tasks.ValueTask<bool>>?
78-
Microsoft.AspNetCore.Identity.PasskeyOptions.VerifyAttestationStatement.set -> void
7979
Microsoft.AspNetCore.Identity.PasskeyOriginValidationContext
8080
Microsoft.AspNetCore.Identity.PasskeyOriginValidationContext.CrossOrigin.get -> bool
8181
Microsoft.AspNetCore.Identity.PasskeyOriginValidationContext.CrossOrigin.init -> void

src/Identity/samples/IdentitySample.PasskeyConformance/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ static ValueTask<bool> ValidateOriginAsync(PasskeyOriginValidationContext contex
246246
return ValueTask.FromResult(uri.Host == "localhost" && uri.Port == 7020);
247247
}
248248

249-
static IOptions<PasskeyOptions> GetPasskeyOptionsFromCreationRequest(ServerPublicKeyCredentialCreationOptionsRequest request)
250-
=> Options.Create(new PasskeyOptions()
249+
static IOptions<IdentityPasskeyOptions> GetPasskeyOptionsFromCreationRequest(ServerPublicKeyCredentialCreationOptionsRequest request)
250+
=> Options.Create(new IdentityPasskeyOptions()
251251
{
252252
ValidateOrigin = ValidateOriginAsync,
253253
AttestationConveyancePreference = request.Attestation,
@@ -256,8 +256,8 @@ static IOptions<PasskeyOptions> GetPasskeyOptionsFromCreationRequest(ServerPubli
256256
UserVerificationRequirement = request.AuthenticatorSelection?.UserVerification,
257257
});
258258

259-
static IOptions<PasskeyOptions> GetPasskeyOptionsFromGetRequest(ServerPublicKeyCredentialGetOptionsRequest request)
260-
=> Options.Create(new PasskeyOptions()
259+
static IOptions<IdentityPasskeyOptions> GetPasskeyOptionsFromGetRequest(ServerPublicKeyCredentialGetOptionsRequest request)
260+
=> Options.Create(new IdentityPasskeyOptions()
261261
{
262262
ValidateOrigin = ValidateOriginAsync,
263263
UserVerificationRequirement = request.UserVerification,

src/Identity/test/Identity.Test/PasskeyOptionsTest.cs renamed to src/Identity/test/Identity.Test/IdentityPasskeyOptionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
namespace Microsoft.AspNetCore.Identity.Test;
55

6-
public class PasskeyOptionsTest
6+
public class IdentityPasskeyOptionsTest
77
{
88
[Fact]
99
public void VerifyDefaultOptions()
1010
{
11-
var options = new PasskeyOptions();
11+
var options = new IdentityPasskeyOptions();
1212

1313
Assert.Equal(TimeSpan.FromMinutes(5), options.AuthenticatorTimeout);
1414
Assert.Equal(32, options.ChallengeSize);

src/Identity/test/Identity.Test/Passkeys/PasskeyHandlerAssertionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ private sealed class AssertionTest : PasskeyScenarioTest<PasskeyAssertionResult<
980980
{
981981
private static readonly byte[] _defaultCredentialId = [1, 2, 3, 4, 5, 6, 7, 8];
982982

983-
public PasskeyOptions PasskeyOptions { get; } = new();
983+
public IdentityPasskeyOptions PasskeyOptions { get; } = new();
984984
public string Origin { get; set; } = "https://example.com";
985985
public PocoUser User { get; set; } = new()
986986
{

src/Identity/test/Identity.Test/Passkeys/PasskeyHandlerAttestationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ private sealed class AttestationTest : PasskeyScenarioTest<PasskeyAttestationRes
978978
private static readonly byte[] _defaultAaguid = new byte[16];
979979
private static readonly byte[] _defaultAttestationStatement = [0xA0]; // Empty CBOR map
980980

981-
public PasskeyOptions PasskeyOptions { get; } = new();
981+
public IdentityPasskeyOptions PasskeyOptions { get; } = new();
982982
public string? UserId { get; set; } = "df0a3af4-bd65-440f-82bd-5b839e300dcd";
983983
public string? UserName { get; set; } = "johndoe";
984984
public string? UserDisplayName { get; set; } = "John Doe";

0 commit comments

Comments
 (0)