6
6
7
7
use Symfony \Component \Validator \Constraints \Choice ;
8
8
use Symfony \Component \Validator \Constraints \NotBlank ;
9
- use Symfony \Component \Validator \Constraints \Type ;
10
9
use Webauthn \AuthenticatorSelectionCriteria ;
11
10
use Webauthn \PublicKeyCredentialCreationOptions ;
12
11
13
12
final class ServerPublicKeyCredentialCreationOptionsRequest
14
13
{
15
- #[Type(type: 'string ' )]
16
14
#[NotBlank]
17
15
public string $ username = '' ;
18
16
19
- #[Type(type: 'string ' )]
20
17
#[NotBlank]
21
18
public string $ displayName = '' ;
22
19
@@ -27,15 +24,14 @@ final class ServerPublicKeyCredentialCreationOptionsRequest
27
24
*/
28
25
public ?array $ authenticatorSelection = null ;
29
26
30
- #[Type(type: ' string ' )]
27
+ #[NotBlank(allowNull: true )]
31
28
#[Choice(choices: [
32
29
PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE ,
33
30
PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_DIRECT ,
34
31
PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_INDIRECT ,
35
32
])]
36
- public string $ attestation = PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE ;
33
+ public ? string $ attestation = PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE ;
37
34
38
- #[Type(type: 'string ' )]
39
35
#[NotBlank(allowNull: true )]
40
36
#[Choice(choices: [
41
37
AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_PREFERRED ,
@@ -44,7 +40,6 @@ final class ServerPublicKeyCredentialCreationOptionsRequest
44
40
])]
45
41
public ?string $ userVerification = AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_PREFERRED ;
46
42
47
- #[Type(type: 'string ' )]
48
43
#[NotBlank(allowNull: true )]
49
44
#[Choice(choices: [
50
45
AuthenticatorSelectionCriteria::RESIDENT_KEY_REQUIREMENT_NO_PREFERENCE ,
@@ -54,7 +49,6 @@ final class ServerPublicKeyCredentialCreationOptionsRequest
54
49
])]
55
50
public ?string $ residentKey = AuthenticatorSelectionCriteria::RESIDENT_KEY_REQUIREMENT_PREFERRED ;
56
51
57
- #[Type(type: 'string ' )]
58
52
#[NotBlank(allowNull: true )]
59
53
#[Choice(choices: [
60
54
AuthenticatorSelectionCriteria::AUTHENTICATOR_ATTACHMENT_NO_PREFERENCE ,
0 commit comments