Skip to content

Commit b67e3f7

Browse files
chore(passkeys): Make it possible to identify more authenticator types (#597)
1 parent c3e5a5c commit b67e3f7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

app/logic/Passkey.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ import com.gu.googleauth.UserIdentity
44
import com.webauthn4j.WebAuthnManager
55
import com.webauthn4j.converter.exception.DataConversionException
66
import com.webauthn4j.credential.{CredentialRecord, CredentialRecordImpl}
7-
import com.webauthn4j.data.AttestationConveyancePreference.NONE
7+
import com.webauthn4j.data.AttestationConveyancePreference.{DIRECT, NONE}
88
import com.webauthn4j.data.PublicKeyCredentialType.PUBLIC_KEY
99
import com.webauthn4j.data.UserVerificationRequirement.REQUIRED
10-
import com.webauthn4j.data._
10+
import com.webauthn4j.data.*
1111
import com.webauthn4j.data.attestation.statement.COSEAlgorithmIdentifier
1212
import com.webauthn4j.data.client.Origin
1313
import com.webauthn4j.data.client.challenge.{Challenge, DefaultChallenge}
14-
import com.webauthn4j.data.extension.client._
14+
import com.webauthn4j.data.extension.client.*
1515
import com.webauthn4j.server.ServerProperty
1616
import com.webauthn4j.util.Base64UrlUtil
1717
import com.webauthn4j.verifier.exception.VerificationException
18-
import models._
18+
import models.*
1919

2020
import java.net.URI
2121
import java.nio.charset.StandardCharsets.UTF_8
2222
import scala.concurrent.duration.{Duration, SECONDS}
23-
import scala.jdk.CollectionConverters._
23+
import scala.jdk.CollectionConverters.*
2424
import scala.util.{Failure, Try}
2525

2626
/** Logic for registration of passkeys and authentication using them. */
@@ -100,7 +100,7 @@ object Passkey {
100100
}
101101
val authenticatorSelection: AuthenticatorSelectionCriteria = null
102102
val hints: Seq[PublicKeyCredentialHints] = Nil
103-
val attestation: AttestationConveyancePreference = NONE
103+
val attestation = DIRECT
104104
val extensions: AuthenticationExtensionsClientInputs[
105105
RegistrationExtensionClientInput
106106
] = null

test/logic/PasskeyTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class PasskeyTest extends AnyFreeSpec with should.Matchers with EitherValues {
7474
| } ],
7575
| "authenticatorSelection" : null,
7676
| "hints" : [ ],
77-
| "attestation" : "none",
77+
| "attestation" : "direct",
7878
| "extensions" : null
7979
|}""".stripMargin
8080
}

0 commit comments

Comments
 (0)