File tree Expand file tree Collapse file tree 1 file changed +19
-11
lines changed
webauthn-server-core/src/test/scala/com/yubico/webauthn/data Expand file tree Collapse file tree 1 file changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -1145,18 +1145,26 @@ object Generators {
11451145 extensions <- arbitrary[AssertionExtensionInputs ]
11461146 rpId <- arbitrary[Optional [String ]]
11471147 timeout <- arbitrary[Optional [java.lang.Long ]]
1148- hints <- arbitrary[Option [List [String ]]]
1148+ hints <-
1149+ arbitrary[Option [Either [List [String ], List [PublicKeyCredentialHint ]]]]
11491150 userVerification <- arbitrary[UserVerificationRequirement ]
1150- } yield PublicKeyCredentialRequestOptions
1151- .builder()
1152- .challenge(challenge)
1153- .allowCredentials(allowCredentials)
1154- .extensions(extensions)
1155- .rpId(rpId)
1156- .timeout(timeout)
1157- .hints(hints.map(_.asJava).orNull)
1158- .userVerification(userVerification)
1159- .build()
1151+ } yield {
1152+ val b = PublicKeyCredentialRequestOptions
1153+ .builder()
1154+ .challenge(challenge)
1155+ .allowCredentials(allowCredentials)
1156+ .extensions(extensions)
1157+ .rpId(rpId)
1158+ .timeout(timeout)
1159+ .userVerification(userVerification)
1160+
1161+ hints.foreach {
1162+ case Left (h) => b.hints(h.asJava)
1163+ case Right (h) => b.hints(h : _* )
1164+ }
1165+
1166+ b.build()
1167+ }
11601168 )
11611169 )
11621170
You can’t perform that action at this time.
0 commit comments