File tree Expand file tree Collapse file tree
webauthn/src/test/java/org/springframework/security/web/webauthn/jackson Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,6 +121,30 @@ void readCredPropsWhenAuthenticatorDisplayName() throws Exception {
121121 assertThat (outputs ).usingRecursiveComparison ().isEqualTo (credProps );
122122 }
123123
124+ @ Test
125+ void readAuthenticationExtensionsClientOutputsWhenUnknownExtension () {
126+ String json = """
127+ {
128+ "unknownObject1": {
129+ "key": "value"
130+ },
131+ "unknownArray": [
132+ { "key": "value1" },
133+ { "key": "value2" }
134+ ],
135+ "credProps": {
136+ "rk": false
137+ },
138+ "unknownObject2": {}
139+ }
140+ """ ;
141+ CredentialPropertiesOutput credProps = new CredentialPropertiesOutput (false );
142+
143+ AuthenticationExtensionsClientOutputs outputs = this .mapper .readValue (json ,
144+ AuthenticationExtensionsClientOutputs .class );
145+ assertThat (outputs .getOutputs ()).usingRecursiveFieldByFieldElementComparator ().contains (credProps );
146+ }
147+
124148 @ Test
125149 void readAuthenticationExtensionsClientOutputsWhenFieldAfter () throws Exception {
126150 String json = """
You can’t perform that action at this time.
0 commit comments