You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewInvalidArgumentException(sprintf('$namespace must be a string, a callable returning a string, null or an instance of "RequestStack". "%s" given.', gettype($namespace)));
76
+
}
47
77
}
48
78
49
79
/**
50
80
* {@inheritdoc}
51
81
*/
52
82
publicfunctiongetToken($tokenId)
53
83
{
54
-
if ($this->storage->hasToken($tokenId)) {
55
-
$value = $this->storage->getToken($tokenId);
84
+
$namespacedId = $this->getNamespace().$tokenId;
85
+
if ($this->storage->hasToken($namespacedId)) {
86
+
$value = $this->storage->getToken($namespacedId);
56
87
} else {
57
88
$value = $this->generator->generateToken();
58
89
59
-
$this->storage->setToken($tokenId, $value);
90
+
$this->storage->setToken($namespacedId, $value);
60
91
}
61
92
62
93
returnnewCsrfToken($tokenId, $value);
@@ -67,9 +98,10 @@ public function getToken($tokenId)
67
98
*/
68
99
publicfunctionrefreshToken($tokenId)
69
100
{
101
+
$namespacedId = $this->getNamespace().$tokenId;
70
102
$value = $this->generator->generateToken();
71
103
72
-
$this->storage->setToken($tokenId, $value);
104
+
$this->storage->setToken($namespacedId, $value);
73
105
74
106
returnnewCsrfToken($tokenId, $value);
75
107
}
@@ -79,18 +111,24 @@ public function refreshToken($tokenId)
0 commit comments