Skip to content

Commit

Permalink
fixup! fixup! Revert new experimental interfaces and classes
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Jan 16, 2025
1 parent aabacc5 commit 35cef94
Showing 1 changed file with 36 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1662,25 +1662,24 @@ class RelyingPartyAssertionSpec
backupFlagsGen = arbitrary[Boolean].map(bs => (true, bs)),
)
) { authData =>
val step: FinishAssertionSteps#PendingStep16 =
finishAssertion(
authenticatorData = authData,
credentialRepository = Some(
Helpers.CredentialRepository.withUser(
Defaults.user,
RegisteredCredential
.builder()
.credentialId(Defaults.credentialId)
.userHandle(Defaults.userHandle)
.publicKeyCose(
getPublicKeyBytes(Defaults.credentialKey)
)
.backupEligible(false)
.backupState(false)
.build(),
)
),
).begin.next.next.next.next.next.next.next.next.next.next.next.next
val step: FinishAssertionSteps#PendingStep16 = finishAssertion(
authenticatorData = authData,
credentialRepository = Some(
Helpers.CredentialRepository.withUser(
Defaults.user,
RegisteredCredential
.builder()
.credentialId(Defaults.credentialId)
.userHandle(Defaults.userHandle)
.publicKeyCose(
getPublicKeyBytes(Defaults.credentialKey)
)
.backupEligible(false)
.backupState(false)
.build(),
)
),
).begin.next.next.next.next.next.next.next.next.next.next.next.next

step.validations shouldBe a[Failure[_]]
step.validations.failed.get shouldBe an[IllegalArgumentException]
Expand All @@ -1700,25 +1699,24 @@ class RelyingPartyAssertionSpec
arbitrary[Boolean],
) {
case (authData, storedBs) =>
val step: FinishAssertionSteps#PendingStep16 =
finishAssertion(
authenticatorData = authData,
credentialRepository = Some(
Helpers.CredentialRepository.withUser(
Defaults.user,
RegisteredCredential
.builder()
.credentialId(Defaults.credentialId)
.userHandle(Defaults.userHandle)
.publicKeyCose(
getPublicKeyBytes(Defaults.credentialKey)
)
.backupEligible(true)
.backupState(storedBs)
.build(),
)
),
).begin.next.next.next.next.next.next.next.next.next.next.next.next
val step: FinishAssertionSteps#PendingStep16 = finishAssertion(
authenticatorData = authData,
credentialRepository = Some(
Helpers.CredentialRepository.withUser(
Defaults.user,
RegisteredCredential
.builder()
.credentialId(Defaults.credentialId)
.userHandle(Defaults.userHandle)
.publicKeyCose(
getPublicKeyBytes(Defaults.credentialKey)
)
.backupEligible(true)
.backupState(storedBs)
.build(),
)
),
).begin.next.next.next.next.next.next.next.next.next.next.next.next

step.validations shouldBe a[Failure[_]]
step.validations.failed.get shouldBe an[
Expand Down

0 comments on commit 35cef94

Please sign in to comment.