Commit 3d09656
committed
minor #43361 [Security] Add getter for attributes property (pluk77)
This PR was merged into the 5.4 branch.
Discussion
----------
[Security] Add getter for attributes property
This addition prevents the need to overload the $attributes property when extending this class to get access to all attributes at once. Currently, there is no way to get all attributes out of the passport without knowing the names of each attribute.
hslavich/OneloginSamlBundle#181 (comment)
| Q | A
| ------------- | ---
| Branch? | 5.4 for features
| Bug fix? | no
| New feature? | Enhancement
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#
Authenticators do not have access to all attributes in the passport at once, nor can they set them at once. The only way currently is to over-load the $attributes in an extended passport class.
Current code also stops a Subscriber/Listener (to for example CheckPassportEvent) from accessing all the current attributes without knowing their name.
Not having access or being able to set all attributes at once is particularly nasty when the attributes are set based on a SAML token. They can currently be set one at a time, but they can not be retrieved without knowing their names.
Commits
-------
dc0a4a543d Add getters and setters for attributes property1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
106 | 111 | | |
0 commit comments