@@ -52,6 +52,11 @@ public function __construct(
5252 $ this ->logger = null === $ logger ? new NullLogger () : $ logger ;
5353 }
5454
55+ /**
56+ * @param ConnectionInterface $connection
57+ *
58+ * @return TokenInterface
59+ */
5560 protected function getToken (ConnectionInterface $ connection )
5661 {
5762 $ token = null ;
@@ -78,14 +83,19 @@ protected function getToken(ConnectionInterface $connection)
7883 }
7984
8085 /**
81- * @param TokenInterface $token
86+ * @param ConnectionInterface $conn
87+ *
88+ * @return TokenInterface
89+ *
90+ * @throws StorageException
91+ * @throws \Exception
8292 */
8393 public function authenticate (ConnectionInterface $ conn )
8494 {
8595 if (1 === count ($ this ->firewalls ) && 'ws_firewall ' === $ this ->firewalls [0 ]) {
8696 $ this ->logger ->warning (sprintf (
87- 'User firewall is not configured, we have set %s by default ' ,
88- $ this ->firewalls [0 ])
97+ 'User firewall is not configured, we have set %s by default ' ,
98+ $ this ->firewalls [0 ])
8999 );
90100 }
91101
@@ -114,21 +124,10 @@ public function authenticate(ConnectionInterface $conn)
114124 $ conn ->WAMP ->clientStorageId = $ identifier ;
115125
116126 $ this ->logger ->info (sprintf (
117- '%s connected [%] ' ,
118- $ username ,
119- $ user instanceof UserInterface ? implode (', ' , $ user ->getRoles ()) : array ()
127+ '%s connected ' ,
128+ $ username
120129 ), $ loggerContext );
121130
122131 return $ token ;
123132 }
124-
125- /**
126- * @param TokenInterface $token
127- *
128- * @return bool
129- */
130- public function supports (TokenInterface $ token )
131- {
132- return $ token instanceof WebsocketToken;
133- }
134133}
0 commit comments