Commit 1fba07d
committed
Make the SamlResponse returned attribute map preserve attribute order
The map returned by SamlResposne containing the attributes returned by
the IdP now preserves the order in which such attributes appear in the
SAML response XML. This is not strictly mandatory, but a plus.
Indeed, the test method
com.onelogin.saml2.test.AuthTest.testProcessResponse() was not
deterministic before this change: indeed, the iteration order of HashMap
is undetermined so expecting to see attribute names in a given order
could lead to a test failure. This change also fixes this and attribute
names are expected now to be seen in the order in which the
corresponding attributes appear in the test XML file.1 parent 523786b commit 1fba07d
File tree
3 files changed
+6
-4
lines changed- core/src/main/java/com/onelogin/saml2/authn
- toolkit/src
- main/java/com/onelogin/saml2
- test/java/com/onelogin/saml2/test
3 files changed
+6
-4
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
572 | 573 | | |
573 | 574 | | |
574 | 575 | | |
575 | | - | |
| 576 | + | |
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
524 | 525 | | |
525 | 526 | | |
526 | 527 | | |
527 | | - | |
| 528 | + | |
528 | 529 | | |
529 | 530 | | |
530 | 531 | | |
| |||
538 | 539 | | |
539 | 540 | | |
540 | 541 | | |
541 | | - | |
542 | 542 | | |
543 | 543 | | |
| 544 | + | |
544 | 545 | | |
545 | 546 | | |
546 | 547 | | |
| |||
0 commit comments