Skip to content

Commit

Permalink
Rename AuthenticatorAttestationRawResponse.ResponseData to `Authent…
Browse files Browse the repository at this point in the history
…icatorAttestationRawResponse.AttestationResponse` (#455)
  • Loading branch information
joegoldman2 authored Nov 10, 2023
1 parent 43442bb commit 8187db5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Src/Fido2.Models/AuthenticatorAssertionRawResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AuthenticatorAssertionRawResponse
[JsonPropertyName("extensions")]
public AuthenticationExtensionsClientOutputs Extensions { get; set; }

public class AssertionResponse
public sealed class AssertionResponse
{
[JsonConverter(typeof(Base64UrlConverter))]
[JsonPropertyName("authenticatorData")]
Expand Down
4 changes: 2 additions & 2 deletions Src/Fido2.Models/AuthenticatorAttestationRawResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public sealed class AuthenticatorAttestationRawResponse
public PublicKeyCredentialType Type { get; set; } = PublicKeyCredentialType.PublicKey;

[JsonPropertyName("response")]
public ResponseData Response { get; set; }
public AttestationResponse Response { get; set; }

[JsonPropertyName("extensions")]
public AuthenticationExtensionsClientOutputs Extensions { get; set; }

public sealed class ResponseData
public sealed class AttestationResponse
{
[JsonConverter(typeof(Base64UrlConverter))]
[JsonPropertyName("attestationObject")]
Expand Down
2 changes: 1 addition & 1 deletion Test/Attestation/Apple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public async Task TestApplePublicKeyMismatch()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = _attestationObject.Encode(),
ClientDataJson = clientDataJson,
Expand Down
34 changes: 17 additions & 17 deletions Test/AuthenticatorResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public async Task TestAuthenticatorOriginsAsync(string origin, string expectedOr
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "none" },
Expand Down Expand Up @@ -179,7 +179,7 @@ public async Task TestAuthenticatorOriginsFail(string origin, string expectedOri
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "none" },
Expand Down Expand Up @@ -248,7 +248,7 @@ public void TestAuthenticatorAttestationRawResponse()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap().Encode(),
ClientDataJson = clientDataJson
Expand Down Expand Up @@ -320,7 +320,7 @@ public void TestAuthenticatorAttestationResponseAttestationObjectNull(byte[] val
{
var rawResponse = new AuthenticatorAttestationRawResponse
{
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = value,
}
Expand All @@ -335,7 +335,7 @@ public void TestAuthenticatorAttestationObjectBadCBOR(byte[] value)
{
var rawResponse = new AuthenticatorAttestationRawResponse
{
Response = new AuthenticatorAttestationRawResponse.ResponseData
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = value,
}
Expand All @@ -361,7 +361,7 @@ public void TestAuthenticatorAttestationObjectMalformed(byte[] value)
{
var rawResponse = new AuthenticatorAttestationRawResponse
{
Response = new AuthenticatorAttestationRawResponse.ResponseData
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = value
}
Expand Down Expand Up @@ -390,7 +390,7 @@ public async Task TestAuthenticatorAttestationResponseInvalidType()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -462,7 +462,7 @@ public async Task TestAuthenticatorAttestationResponseInvalidRawId(byte[] value)
Type = PublicKeyCredentialType.PublicKey,
Id = value,
RawId = value,
Response = new AuthenticatorAttestationRawResponse.ResponseData
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -532,7 +532,7 @@ public async Task TestAuthenticatorAttestationResponseInvalidRawType()
Type = PublicKeyCredentialType.Invalid,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -609,7 +609,7 @@ public async Task TestAuthenticatorAttestationResponseRpidMismatch()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -687,7 +687,7 @@ public async Task TestAuthenticatorAttestationResponseNotUserPresentAsync()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -767,7 +767,7 @@ public async Task TestAuthenticatorAttestationResponseBackupEligiblePolicyRequir
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -845,7 +845,7 @@ public async Task TestAuthenticatorAttestationResponseBackupEligiblePolicyDisall
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -923,7 +923,7 @@ public async Task TestAuthenticatorAttestationResponseNoAttestedCredentialData()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -1001,7 +1001,7 @@ public async Task TestAuthenticatorAttestationResponseUnknownAttestationType()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "testing" },
Expand Down Expand Up @@ -1079,7 +1079,7 @@ public async Task TestAuthenticatorAttestationResponseNotUniqueCredId()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "none" },
Expand Down Expand Up @@ -1156,7 +1156,7 @@ public async Task TestAuthenticatorAttestationResponseUVRequired()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = new CborMap {
{ "fmt", "none" },
Expand Down
2 changes: 1 addition & 1 deletion Test/Fido2Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public async Task<MakeNewCredentialResult> MakeAttestationResponseAsync()
Type = PublicKeyCredentialType.PublicKey,
Id = new byte[] { 0xf1, 0xd0 },
RawId = new byte[] { 0xf1, 0xd0 },
Response = new AuthenticatorAttestationRawResponse.ResponseData()
Response = new AuthenticatorAttestationRawResponse.AttestationResponse
{
AttestationObject = _attestationObject.Encode(),
ClientDataJson = _clientDataJson,
Expand Down

0 comments on commit 8187db5

Please sign in to comment.