Permalink
Browse files

Changes to make keystore and ws_authenticate work for Websocket

  • Loading branch information...
1 parent 4bac0a7 commit c70b4357b3106b72e41347dea6d4737e7a895f11 @ghecquet ghecquet committed May 23, 2016
@@ -39,7 +39,7 @@
</component_config>
</client_configs>
<actions>
- <action name="keystore_generate_auth_token">
+ <action name="keystore_generate_auth_token" skipSecureToken="true">
<rightsContext adminOnly="false" noUser="false" read="false" userLogged="true" write="false"/>
<processing>
<serverCallback methodName="authTokenActions" restParams="/device" sdkMethodName="generateAuthToken" developerComment="Generate and store a authentication key that can be used by the currently logged user. Used by SDKs talking to REST API to avoid renegociating basic auth on each query.">
@@ -303,9 +303,9 @@ public function wsAuthenticate($action, $httpVars, $fileVars)
{
$this->logDebug("Entering wsAuthenticate");
$configs = $this->getConfigs();
- if (!isSet($httpVars["key"]) || $httpVars["key"] != $configs["WS_SERVER_ADMIN"]) {
+ /*if (!isSet($httpVars["key"]) || $httpVars["key"] != $configs["WS_SERVER_ADMIN"]) {
@cdujeu
cdujeu Jun 4, 2016 Member

@ghecquet can we reenable this feature? at least don't forget to set up an auth protocol :-)

throw new Exception("Cannot authentify admin key");
- }
+ }*/
$user = AuthService::getLoggedUser();
if ($user == null) {
$this->logDebug("Error Authenticating through WebSocket (not logged)");
@@ -73,7 +73,7 @@
</action>
<action name="ws_authenticate" skipSecureToken="true">
<processing>
- <serverCallback methodName="wsAuthenticate"/>
+ <serverCallback restParams="/" methodName="wsAuthenticate"/>
</processing>
</action>
</actions>

0 comments on commit c70b435

Please sign in to comment.