|
1 | 1 | package com.yubico.fido.metadata;
|
2 | 2 |
|
3 | 3 | import com.fasterxml.jackson.annotation.JsonAlias;
|
4 |
| -import lombok.AccessLevel; |
5 |
| -import lombok.AllArgsConstructor; |
| 4 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 5 | +import com.fasterxml.jackson.annotation.JsonProperty; |
6 | 6 | import lombok.Builder;
|
7 | 7 | import lombok.Value;
|
8 | 8 | import lombok.extern.jackson.Jacksonized;
|
|
18 | 18 | @Value
|
19 | 19 | @Builder
|
20 | 20 | @Jacksonized
|
21 |
| -@AllArgsConstructor(access = AccessLevel.PRIVATE) |
22 | 21 | public class SupportedCtapOptions {
|
23 | 22 |
|
24 | 23 | /**
|
@@ -157,4 +156,46 @@ public class SupportedCtapOptions {
|
157 | 156 | * to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
|
158 | 157 | */
|
159 | 158 | @Builder.Default boolean alwaysUv = false;
|
| 159 | + |
| 160 | + @JsonCreator |
| 161 | + private SupportedCtapOptions( |
| 162 | + @JsonProperty("plat") Boolean plat, |
| 163 | + @JsonProperty("rk") Boolean rk, |
| 164 | + @JsonProperty("clientPin") Boolean clientPin, |
| 165 | + @JsonProperty("up") Boolean up, |
| 166 | + @JsonProperty("uv") Boolean uv, |
| 167 | + @JsonProperty("pinUvAuthToken") Boolean pinUvAuthToken, |
| 168 | + @JsonProperty("noMcGaPermissionsWithClientPin") Boolean noMcGaPermissionsWithClientPin, |
| 169 | + @JsonProperty("largeBlobs") Boolean largeBlobs, |
| 170 | + @JsonProperty("ep") Boolean ep, |
| 171 | + @JsonProperty("bioEnroll") Boolean bioEnroll, |
| 172 | + @JsonProperty("userVerificationMgmtPreview") Boolean userVerificationMgmtPreview, |
| 173 | + @JsonProperty("uvBioEnroll") Boolean uvBioEnroll, |
| 174 | + @JsonProperty("authnrCfg") Boolean authnrCfg, |
| 175 | + @JsonProperty("uvAcfg") Boolean uvAcfg, |
| 176 | + @JsonProperty("credMgmt") Boolean credMgmt, |
| 177 | + @JsonProperty("credentialMgmtPreview") Boolean credentialMgmtPreview, |
| 178 | + @JsonProperty("setMinPINLength") Boolean setMinPINLength, |
| 179 | + @JsonProperty("makeCredUvNotRqd") Boolean makeCredUvNotRqd, |
| 180 | + @JsonProperty("alwaysUv") Boolean alwaysUv) { |
| 181 | + this.plat = plat; |
| 182 | + this.rk = rk; |
| 183 | + this.clientPin = clientPin != null; |
| 184 | + this.up = up; |
| 185 | + this.uv = uv != null; |
| 186 | + this.pinUvAuthToken = Boolean.TRUE.equals(pinUvAuthToken); |
| 187 | + this.noMcGaPermissionsWithClientPin = Boolean.TRUE.equals(noMcGaPermissionsWithClientPin); |
| 188 | + this.largeBlobs = Boolean.TRUE.equals(largeBlobs); |
| 189 | + this.ep = ep != null; |
| 190 | + this.bioEnroll = bioEnroll != null; |
| 191 | + this.userVerificationMgmtPreview = userVerificationMgmtPreview != null; |
| 192 | + this.uvBioEnroll = Boolean.TRUE.equals(uvBioEnroll); |
| 193 | + this.authnrCfg = Boolean.TRUE.equals(authnrCfg); |
| 194 | + this.uvAcfg = Boolean.TRUE.equals(uvAcfg); |
| 195 | + this.credMgmt = Boolean.TRUE.equals(credMgmt); |
| 196 | + this.credentialMgmtPreview = Boolean.TRUE.equals(credentialMgmtPreview); |
| 197 | + this.setMinPINLength = Boolean.TRUE.equals(setMinPINLength); |
| 198 | + this.makeCredUvNotRqd = Boolean.TRUE.equals(makeCredUvNotRqd); |
| 199 | + this.alwaysUv = alwaysUv != null; |
| 200 | + } |
160 | 201 | }
|
0 commit comments