Closed cyprus1spirit closed 4 years ago
No matter how I defined it in the javascript (autobahn-js) client in browser, authid always returns "anonymous". Any ideas?
I register the topic like this: $session->register('com.myapp.hello', [$this, "fetchUser"], ['disclose_caller' => true]);
$session->register('com.myapp.hello', [$this, "fetchUser"], ['disclose_caller' => true]);
and I get it in function:
function fetchUser($args, $kwArgs, $details){ echo $details->authid; }
my javascript (browser) spits the authid like this:
... var connection = new autobahn.Connection({ url: 'ws://xxx.xxx.xx.x:8080/', realm: 'realm1', authmethods: ["wampcra"], authid: "Mickey", onchallenge: onchallenge }); ...
my router is defined like this (whole code)
<?php require 'bootstrap.php'; require 'InternalClient.php'; use Thruway\Peer\Router; use Thruway\Transport\RatchetTransportProvider; $realm = "realm1"; $router = new Router(); $InternalClient = new InternalClient($realm, $router->getLoop()); $transportProvider = new RatchetTransportProvider("0.0.0.0", 8080); $router->registerModule($transportProvider); $router->addInternalClient($InternalClient); $router->start(); ?>
Thank you in advance !
You're trying to use WAMPCRA authentication on the client but you don't have any authentication configured in the router.
No matter how I defined it in the javascript (autobahn-js) client in browser, authid always returns "anonymous". Any ideas?
I register the topic like this:
$session->register('com.myapp.hello', [$this, "fetchUser"], ['disclose_caller' => true]);
and I get it in function:
function fetchUser($args, $kwArgs, $details){ echo $details->authid; }
my javascript (browser) spits the authid like this:
my router is defined like this (whole code)
Thank you in advance !