Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WebsocketAuthenticationProvider fix
  • Loading branch information
valentint committed Feb 21, 2017
commit b2b64ed1d8258159495342f03e8dd519a064f307
10 changes: 7 additions & 3 deletions Client/Auth/WebsocketAuthenticationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,15 @@ protected function getToken(ConnectionInterface $connection)
}
}

if (null === $token && !$this->tokenStorage->getToken()) {
$token = new AnonymousToken($this->firewalls[0], 'anon-' . $connection->WAMP->sessionId);
if (null === $token) {
if (!$this->tokenStorage->getToken()) {
$token = new AnonymousToken($this->firewalls[0], 'anon-' . $connection->WAMP->sessionId);
} else {
$token = $this->tokenStorage->getToken();
}
}

if ($token && $this->tokenStorage->getToken() !== $token) {
if ($this->tokenStorage->getToken() !== $token) {
$this->tokenStorage->setToken($token);
}

Expand Down