Authentication no work.
Closed this issue · 0 comments
saidmoya12 commented
I cannot enable the cra auth with FOSUserBundle.
Platform
Symfony 3.1
FOSUserBundle dev/master
#config.yml
voryx_thruway:
realm: 'realm1'
url: 'ws://127.0.0.1:8081'
router:
ip: '127.0.0.1'
port: '9090'
trusted_port: '8081'
authentication: true
locations:
bundles: ["AppBundle"]
user_provider: 'fos_user.user_manager'
#services.yml
wamp_cra_auth:
class: Thruway\Authentication\WampCraAuthProvider
parent: voryx.thruway.wamp.cra.auth.client
tags:
- { name: thruway.internal_client }
doctrine.listener.e_listener:
class: AppBundle\EventListener\DoctrineListener
arguments: ["@service_container"]
tags:
- { name: doctrine.event_subscriber, connection: default }
//Client
var connection = new autobahn.Connection({
url: 'ws://127.0.0.1:9090',
realm: 'realm1',
authmethods: ["wampcra"],
authid: this.user.username,
onchallenge: this._onchallenge //never trigger
});
connection.onopen = function (session, details) {
console.log("connected session with ID " + session.id); //work
}
connection.open();