Skip to content

Commit

Permalink
[Passkey #6] Update passkey related proto naming change (#11953)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoshouzi-gh authored Oct 17, 2023
1 parent d89ca8c commit 9ab4d5f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@
@var kCredentialIDKey
@brief The key for registered credential identifier.
*/
static NSString *const kCredentialIDKey = @"credentialId";
static NSString *const kCredentialIDKey = @"id";

/**
@var kAuthAttestationRespKey
@brief The key for attestation response from a FIDO authenticator.
*/
static NSString *const kAuthAttestationRespKey = @"authenticatorAttestationResponse";
static NSString *const kAuthAttestationRespKey = @"response";

/**
@var kClientDataJsonKey
@brief The key for CollectedClientData object from the authenticator.
*/
static NSString *const kClientDataJsonKey = @"clientDataJson";
static NSString *const kClientDataJsonKey = @"clientDataJSON";

/**
@var kAttestationObject
Expand All @@ -83,6 +83,7 @@ - (nullable instancetype)initWithIDToken:(NSString *)IDToken
requestConfiguration:requestConfiguration];
if (self) {
self.useIdentityPlatform = YES;
self.useStaging = NO;
_IDToken = IDToken;
_name = name;
_credentialID = credentialID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@
@var kCredentialIDKey
@brief The key for registered credential identifier.
*/
static NSString *const kCredentialIDKey = @"credentialId";
static NSString *const kCredentialIDKey = @"id";

/**
@var kAuthAssertionRespKey
@brief The key for authentication assertion from the authenticator.
*/
static NSString *const kAuthAssertionRespKey = @"authenticatorAssertionResponse";
static NSString *const kAuthAssertionRespKey = @"response";

/**
@var kClientDataJsonKey
@brief The key for CollectedClientData object from the authenticator.
*/
static NSString *const kClientDataJsonKey = @"clientDataJson";
static NSString *const kClientDataJsonKey = @"clientDataJSON";

/**
@var kAuthenticatorDataKey
Expand Down Expand Up @@ -83,6 +83,7 @@ - (nullable instancetype)initWithCredentialID:(NSString *)credentialID
requestConfiguration:requestConfiguration];
if (self) {
self.useIdentityPlatform = YES;
self.useStaging = NO;
_credentialID = credentialID;
_clientDataJson = clientDataJson;
_authenticatorData = authenticatorData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ - (nullable instancetype)initWithIDToken:(NSString *)IDToken
if (self) {
_IDToken = IDToken;
self.useIdentityPlatform = YES;
self.useStaging = NO;
}

return self;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ - (nullable instancetype)initWithRequestConfiguration:

if (self) {
self.useIdentityPlatform = YES;
self.useStaging = NO;
}

return self;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
@var kCredentialIDKey
@brief credential ID field.
*/
static NSString *const kCredentialIDKey = @"credentialId";
static NSString *const kCredentialIDKey = @"id";

/**
@var kRawAttestationObject
Expand All @@ -101,7 +101,7 @@
@var kRawClientDataJSONKey
@brief The key for the attestation object from the authenticator.
*/
static NSString *const kRawClientDataJSONKey = @"clientDataJson";
static NSString *const kRawClientDataJSONKey = @"clientDataJSON";

/**
@var kAuthRegistrationRespKey
Expand All @@ -113,7 +113,7 @@
@var kAuthAttestationRespKey
@brief The key for attestation response from a FIDO authenticator.
*/
static NSString *const kAuthAttestationRespKey = @"authenticatorAttestationResponse";
static NSString *const kAuthAttestationRespKey = @"response";

/**
@class FIRFinalizePasskeyEnrollmentRequestTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
@var kAuthAssertionRespKey
@brief The key for authentication assertion from the authenticator.
*/
static NSString *const kAuthAssertionRespKey = @"authenticatorAssertionResponse";
static NSString *const kAuthAssertionRespKey = @"response";

/**
@var kCredentialID
Expand All @@ -65,7 +65,7 @@
@var kCredentialIDKey
@brief credential ID field.
*/
static NSString *const kCredentialIDKey = @"credentialId";
static NSString *const kCredentialIDKey = @"id";

/**
@var kRawClientDataJSON
Expand All @@ -77,7 +77,7 @@
@var kRawClientDataJSONKey
@brief The key for the attestation object from the authenticator.
*/
static NSString *const kRawClientDataJSONKey = @"clientDataJson";
static NSString *const kRawClientDataJSONKey = @"clientDataJSON";

/**
@var kAuthenticatorData
Expand Down

0 comments on commit 9ab4d5f

Please sign in to comment.