File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
webauthn-server-core/src/test/scala/com/yubico/webauthn Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -49,4 +49,16 @@ object Generators {
49
49
.warnings(warnings)
50
50
.build())
51
51
52
+ implicit val arbitraryRegisteredCredential : Arbitrary [RegisteredCredential ] = Arbitrary (for {
53
+ credentialId <- arbitrary[ByteArray ]
54
+ userHandle <- arbitrary[ByteArray ]
55
+ publicKeyCose <- arbitrary[ByteArray ]
56
+ signatureCount <- arbitrary[Int ]
57
+ } yield RegisteredCredential .builder()
58
+ .credentialId(credentialId)
59
+ .userHandle(userHandle)
60
+ .publicKeyCose(publicKeyCose)
61
+ .signatureCount(signatureCount)
62
+ .build())
63
+
52
64
}
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import com.yubico.webauthn.attestation.Transport
40
40
import com .yubico .webauthn .data .Generators ._
41
41
import com .yubico .webauthn .extension .appid .AppId
42
42
import com .yubico .webauthn .extension .appid .Generators ._
43
+ import com .yubico .webauthn .RegisteredCredential
43
44
import org .junit .runner .RunWith
44
45
import org .scalacheck .Arbitrary
45
46
import org .scalatest .FunSpec
@@ -119,6 +120,7 @@ class JsonIoSpec extends FunSpec with Matchers with ScalaCheckDrivenPropertyChec
119
120
test(new TypeReference [PublicKeyCredentialParameters ]() {})
120
121
test(new TypeReference [PublicKeyCredentialRequestOptions ]() {})
121
122
test(new TypeReference [PublicKeyCredentialType ]() {})
123
+ test(new TypeReference [RegisteredCredential ]() {})
122
124
test(new TypeReference [RegistrationExtensionInputs ]() {})
123
125
test(new TypeReference [RegistrationResult ]() {})
124
126
test(new TypeReference [RelyingPartyIdentity ]() {})
You can’t perform that action at this time.
0 commit comments