|
207 | 207 | import org.springframework.security.web.server.firewall.ServerExchangeRejectedException; |
208 | 208 | import org.springframework.security.web.session.HttpSessionCreatedEvent; |
209 | 209 | import org.springframework.security.web.session.HttpSessionIdChangedEvent; |
| 210 | +import org.springframework.security.web.webauthn.api.AttestationConveyancePreference; |
210 | 211 | import org.springframework.security.web.webauthn.api.AuthenticationExtensionsClientInputs; |
211 | 212 | import org.springframework.security.web.webauthn.api.AuthenticationExtensionsClientOutputs; |
212 | 213 | import org.springframework.security.web.webauthn.api.AuthenticatorAssertionResponse; |
213 | 214 | import org.springframework.security.web.webauthn.api.AuthenticatorAttachment; |
| 215 | +import org.springframework.security.web.webauthn.api.AuthenticatorSelectionCriteria; |
214 | 216 | import org.springframework.security.web.webauthn.api.AuthenticatorTransport; |
215 | 217 | import org.springframework.security.web.webauthn.api.Bytes; |
| 218 | +import org.springframework.security.web.webauthn.api.COSEAlgorithmIdentifier; |
216 | 219 | import org.springframework.security.web.webauthn.api.CredProtectAuthenticationExtensionsClientInput; |
217 | 220 | import org.springframework.security.web.webauthn.api.CredentialPropertiesOutput; |
218 | 221 | import org.springframework.security.web.webauthn.api.ImmutableAuthenticationExtensionsClientInput; |
219 | 222 | import org.springframework.security.web.webauthn.api.ImmutableAuthenticationExtensionsClientInputs; |
220 | 223 | import org.springframework.security.web.webauthn.api.ImmutableAuthenticationExtensionsClientOutputs; |
221 | 224 | import org.springframework.security.web.webauthn.api.ImmutablePublicKeyCredentialUserEntity; |
222 | 225 | import org.springframework.security.web.webauthn.api.PublicKeyCredential; |
| 226 | +import org.springframework.security.web.webauthn.api.PublicKeyCredentialCreationOptions; |
223 | 227 | import org.springframework.security.web.webauthn.api.PublicKeyCredentialDescriptor; |
| 228 | +import org.springframework.security.web.webauthn.api.PublicKeyCredentialParameters; |
224 | 229 | import org.springframework.security.web.webauthn.api.PublicKeyCredentialRequestOptions; |
| 230 | +import org.springframework.security.web.webauthn.api.PublicKeyCredentialRpEntity; |
225 | 231 | import org.springframework.security.web.webauthn.api.PublicKeyCredentialType; |
226 | 232 | import org.springframework.security.web.webauthn.api.PublicKeyCredentialUserEntity; |
| 233 | +import org.springframework.security.web.webauthn.api.ResidentKeyRequirement; |
227 | 234 | import org.springframework.security.web.webauthn.api.TestAuthenticationAssertionResponses; |
228 | 235 | import org.springframework.security.web.webauthn.api.TestBytes; |
| 236 | +import org.springframework.security.web.webauthn.api.TestPublicKeyCredentialCreationOptions; |
229 | 237 | import org.springframework.security.web.webauthn.api.TestPublicKeyCredentialRequestOptions; |
230 | 238 | import org.springframework.security.web.webauthn.api.TestPublicKeyCredentialUserEntities; |
231 | 239 | import org.springframework.security.web.webauthn.api.TestPublicKeyCredentials; |
232 | 240 | import org.springframework.security.web.webauthn.api.UserVerificationRequirement; |
233 | 241 | import org.springframework.security.web.webauthn.authentication.WebAuthnAuthentication; |
234 | 242 | import org.springframework.security.web.webauthn.authentication.WebAuthnAuthenticationRequestToken; |
235 | 243 | import org.springframework.security.web.webauthn.management.RelyingPartyAuthenticationRequest; |
| 244 | +import org.springframework.security.web.webauthn.management.TestPublicKeyCredentialRpEntities; |
236 | 245 | import org.springframework.util.ReflectionUtils; |
237 | 246 |
|
238 | 247 | final class SerializationSamples { |
@@ -668,6 +677,22 @@ final class SerializationSamples { |
668 | 677 | }); |
669 | 678 | // @formatter:on |
670 | 679 |
|
| 680 | + generatorByClassName.put(AttestationConveyancePreference.class, |
| 681 | + (r) -> AttestationConveyancePreference.INDIRECT); |
| 682 | + generatorByClassName.put(AuthenticatorSelectionCriteria.class, |
| 683 | + (r) -> AuthenticatorSelectionCriteria.builder() |
| 684 | + .userVerification(UserVerificationRequirement.REQUIRED) |
| 685 | + .build()); |
| 686 | + generatorByClassName.put(COSEAlgorithmIdentifier.class, (r) -> COSEAlgorithmIdentifier.ES256); |
| 687 | + generatorByClassName.put(PublicKeyCredentialParameters.class, (r) -> PublicKeyCredentialParameters.ES256); |
| 688 | + generatorByClassName.put(PublicKeyCredentialRpEntity.class, |
| 689 | + (r) -> TestPublicKeyCredentialRpEntities.createRpEntity().build()); |
| 690 | + generatorByClassName.put(ResidentKeyRequirement.class, (r) -> ResidentKeyRequirement.REQUIRED); |
| 691 | + generatorByClassName.put(PublicKeyCredentialCreationOptions.class, |
| 692 | + (r) -> TestPublicKeyCredentialCreationOptions.createPublicKeyCredentialCreationOptions() |
| 693 | + .rp(TestPublicKeyCredentialRpEntities.createRpEntity().build()) |
| 694 | + .build()); |
| 695 | + |
671 | 696 | generatorByClassName.put(CredentialPropertiesOutput.ExtensionOutput.class, |
672 | 697 | (r) -> new CredentialPropertiesOutput(true).getOutput()); |
673 | 698 |
|
|
0 commit comments