Rafael Gondim
Rafael Gondim

Reputation: 5

RPC class without authentication

I'm trying to make a RPC call to a deepstream server, which require authentication, here is the config:

#Authentication
auth:
    type: http
    options:
        endpointUrl: http://localhost:3000/auth-user
        permittedStatusCodes: [ 200 ]
        requestTimeout: 500

And here is the permissions:

rpc:
    "*":
       provide: true
       request: true

The authentication is working fine. But when I try to make a RPC call before calling

client.login()

I keep getting this error: ACK_TIMEOUT, and looking on the websocket frames it doesn't seems that frames/data are sent to the server, is there some client side validation forbidding any interaction with the server before the login call? Is there a way to make an anonymous RPC call then make the login?

Upvotes: 0

Views: 234

Answers (1)

wolframhempel
wolframhempel

Reputation: 1094

deepstream does block all calls before authentication - even for public connections it's required to call login with null or empty arguments first. You could however create a public/open user that the http auth server allows through to make the initial RPC, then immediately disconnect and reconnect with the proper credentials

Upvotes: 0

Related Questions