Skip to content

Commit

Permalink
rpId is nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Jan 31, 2025
1 parent 5bad332 commit 70e14a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dotnet/src/webdriver/VirtualAuth/Credential.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public sealed class Credential
private readonly byte[] id;
private readonly byte[]? userHandle;

private Credential(byte[] id, bool isResidentCredential, string rpId, string privateKey, byte[]? userHandle, int signCount)
private Credential(byte[] id, bool isResidentCredential, string? rpId, string privateKey, byte[]? userHandle, int signCount)
{
this.id = id ?? throw new ArgumentNullException(nameof(id));
this.IsResidentCredential = isResidentCredential;
this.RpId = rpId ?? throw new ArgumentNullException(nameof(rpId));
this.RpId = rpId;
this.PrivateKey = privateKey ?? throw new ArgumentNullException(nameof(privateKey));
this.userHandle = userHandle;
this.SignCount = signCount;
Expand All @@ -52,8 +52,8 @@ private Credential(byte[] id, bool isResidentCredential, string rpId, string pri
/// <param name="privateKey">The private Key for the credentials.</param>
/// <param name="signCount">The signature counter for the credentials.</param>
/// <returns>The created instance of the Credential class.</returns>
/// <exception cref="ArgumentNullException">If <paramref name="id"/>, <paramref name="rpId"/>, or <paramref name="privateKey"/> are <see langword="null"/>.</exception>
public static Credential CreateNonResidentCredential(byte[] id, string rpId, string privateKey, int signCount)
/// <exception cref="ArgumentNullException">If <paramref name="id"/> or <paramref name="privateKey"/> are <see langword="null"/>.</exception>
public static Credential CreateNonResidentCredential(byte[] id, string? rpId, string privateKey, int signCount)
{
return new Credential(id, false, rpId, privateKey, null, signCount);
}
Expand All @@ -67,8 +67,8 @@ public static Credential CreateNonResidentCredential(byte[] id, string rpId, str
/// <param name="userHandle">The user handle associated to the credential.</param>
/// <param name="signCount">The signature counter for the credentials.</param>
/// <returns>The created instance of the Credential class.</returns>
/// <exception cref="ArgumentNullException">If <paramref name="id"/>, <paramref name="rpId"/>, or <paramref name="privateKey"/> are <see langword="null"/>.</exception>
public static Credential CreateResidentCredential(byte[] id, string rpId, string privateKey, byte[] userHandle, int signCount)
/// <exception cref="ArgumentNullException">If <paramref name="id"/> or <paramref name="privateKey"/> are <see langword="null"/>.</exception>
public static Credential CreateResidentCredential(byte[] id, string? rpId, string privateKey, byte[] userHandle, int signCount)
{
return new Credential(id, true, rpId, privateKey, userHandle, signCount);
}
Expand Down

0 comments on commit 70e14a6

Please sign in to comment.