Commit 388ae55
committed
feature #13342 [security] Fetching current stored context when not explicitly specified (jaytaph)
This PR was squashed before being merged into the 2.7 branch (closes #13342).
Discussion
----------
[security] Fetching current stored context when not explicitly specified
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12160
| License | MIT
| Doc PR | N/A
This patch will use the current stored context found in a token (provided, there is one), if none has been specified.
According to a quick scan of the code, this will be the only place where `getProviderKey()` is used outside a specific class (the authentication providers will check token type before calling `getProviderKey()`, but maybe it's be a good idea to implement a "providerKeyTokenInterface" or something. It's a nicer solution imho than the current `method_exists()`
Commits
-------
f6046ba [security] Fetching current stored context when not explicitly specifiedFile tree
Expand file treeCollapse file tree
6 files changed
+96
-15
lines changedOpen diff view settings
Filter options
- src/Symfony/Bundle/SecurityBundle
- Resources/config
- Templating/Helper
- Tests/Functional
- Bundle/FormLoginBundle/Resources/views/Login
- app/StandardFormLogin
- Twig/Extension
Expand file treeCollapse file tree
6 files changed
+96
-15
lines changedOpen diff view settings
Collapse file
src/Symfony/Bundle/SecurityBundle/Resources/config/templating_php.xml
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Resources/config/templating_php.xml+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
| 15 | + |
16 | 16 | |
| 17 | + |
17 | 18 | |
18 | 19 | |
19 | 20 | |
|
Collapse file
src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php+37-10Lines changed: 37 additions & 10 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
14 | 14 | |
15 | 15 | |
16 | 16 | |
| 17 | + |
17 | 18 | |
| 19 | + |
18 | 20 | |
19 | 21 | |
20 | 22 | |
| ||
25 | 27 | |
26 | 28 | |
27 | 29 | |
28 | | - |
| 30 | + |
29 | 31 | |
30 | 32 | |
| 33 | + |
31 | 34 | |
32 | 35 | |
33 | 36 | |
34 | 37 | |
35 | | - |
36 | | - |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
37 | 43 | |
38 | | - |
| 44 | + |
39 | 45 | |
40 | | - |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
41 | 55 | |
| 56 | + |
42 | 57 | |
43 | 58 | |
44 | 59 | |
| ||
64 | 79 | |
65 | 80 | |
66 | 81 | |
67 | | - |
| 82 | + |
68 | 83 | |
69 | 84 | |
70 | 85 | |
| ||
76 | 91 | |
77 | 92 | |
78 | 93 | |
79 | | - |
| 94 | + |
80 | 95 | |
81 | 96 | |
82 | 97 | |
| ||
88 | 103 | |
89 | 104 | |
90 | 105 | |
91 | | - |
| 106 | + |
92 | 107 | |
93 | 108 | |
94 | 109 | |
95 | 110 | |
96 | | - |
| 111 | + |
97 | 112 | |
98 | 113 | |
99 | 114 | |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
100 | 127 | |
101 | 128 | |
102 | 129 | |
| ||
106 | 133 | |
107 | 134 | |
108 | 135 | |
109 | | - |
| 136 | + |
110 | 137 | |
111 | 138 | |
112 | 139 | |
|
Collapse file
src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/after_login.html.twig
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/after_login.html.twig+10Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
6 | 16 | |
Collapse file
src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php+34Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
39 | 73 | |
40 | 74 | |
41 | 75 | |
|
Collapse file
src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/config.yml
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/config.yml+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
| 26 | + |
26 | 27 | |
27 | 28 | |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
28 | 37 | |
29 | 38 | |
30 | 39 | |
|
Collapse file
src/Symfony/Bundle/SecurityBundle/Twig/Extension/LogoutUrlExtension.php
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Twig/Extension/LogoutUrlExtension.php+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
41 | 41 | |
42 | 42 | |
43 | 43 | |
44 | | - |
| 44 | + |
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | | - |
| 48 | + |
49 | 49 | |
50 | 50 | |
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | 54 | |
55 | 55 | |
56 | | - |
| 56 | + |
57 | 57 | |
58 | 58 | |
59 | 59 | |
60 | | - |
| 60 | + |
61 | 61 | |
62 | 62 | |
63 | 63 | |
|
0 commit comments