@@ -985,26 +985,48 @@ class RelyingPartyStartOperationSpec
985
985
describe(" allows setting the hints" ) {
986
986
val rp = relyingParty(userId = userId)
987
987
988
- it(" to a value not in the spec." ) {
988
+ it(" to string values in the spec or not ." ) {
989
989
val pkcco = rp.startRegistration(
990
990
StartRegistrationOptions
991
991
.builder()
992
992
.user(userId)
993
- .hints(" hej" )
993
+ .hints(" hej" , " security-key " , " hoj " , " client-device " , " hybrid " )
994
994
.build()
995
995
)
996
- pkcco.getHints.asScala should equal(List (" hej" ))
996
+ pkcco.getHints.asScala should equal(
997
+ List (
998
+ " hej" ,
999
+ PublicKeyCredentialHint .SECURITY_KEY .getValue,
1000
+ " hoj" ,
1001
+ PublicKeyCredentialHint .CLIENT_DEVICE .getValue,
1002
+ PublicKeyCredentialHint .HYBRID .getValue,
1003
+ )
1004
+ )
997
1005
}
998
1006
999
- it(" to a value in the spec." ) {
1007
+ it(" to PublicKeyCredentialHint values in the spec or not ." ) {
1000
1008
val pkcco = rp.startRegistration(
1001
1009
StartRegistrationOptions
1002
1010
.builder()
1003
1011
.user(userId)
1004
- .hints(PublicKeyCredentialHint .SECURITY_KEY )
1012
+ .hints(
1013
+ PublicKeyCredentialHint .of(" hej" ),
1014
+ PublicKeyCredentialHint .HYBRID ,
1015
+ PublicKeyCredentialHint .SECURITY_KEY ,
1016
+ PublicKeyCredentialHint .of(" hoj" ),
1017
+ PublicKeyCredentialHint .CLIENT_DEVICE ,
1018
+ )
1005
1019
.build()
1006
1020
)
1007
- pkcco.getHints.asScala should equal(List (" security-key" ))
1021
+ pkcco.getHints.asScala should equal(
1022
+ List (
1023
+ " hej" ,
1024
+ PublicKeyCredentialHint .HYBRID .getValue,
1025
+ PublicKeyCredentialHint .SECURITY_KEY .getValue,
1026
+ " hoj" ,
1027
+ PublicKeyCredentialHint .CLIENT_DEVICE .getValue,
1028
+ )
1029
+ )
1008
1030
}
1009
1031
1010
1032
it(" or not, defaulting to the empty list." ) {
0 commit comments