Coder Social home page Coder Social logo

auth_key as argument to publish about python HOT 5 CLOSED

pubnub avatar pubnub commented on September 9, 2024
auth_key as argument to publish

from python.

Comments (5)

mpvader avatar mpvader commented on September 9, 2024

Hi, I had the same issue. Our solution was to instantiate a Pubnub() object for each auth-key. I think you will find that this behaviour is the same for all Pubnub APIs, so simply changing the Python one will be confusing, since it then differs from the JS one etc.

But that is up to the Pubnub guys to answer :).

from python.

parasyte avatar parasyte commented on September 9, 2024

The recommended use for auth_key is that it is tied to a specific user. The same auth_key can be applied to multiple channels via the grant API. Think of it as a session token, and that token binds permissions to private resources (eg the channels).

Does it make sense?

from python.

mpvader avatar mpvader commented on September 9, 2024

Sorry, my previous message is confusing. We have the same issue for the cypher parameter. Not the auth-key that belongs to the grant API. We use the cypher and some other things to achieve more or less the same functionality as the grant API can bring. But chose not to use that API for some other reasons pertaining to our setup.

For us it would have been handy to pass the auth key to Pubnub.subscribe(). But they way we do it now also works fine.

from python.

doc-hex avatar doc-hex commented on September 9, 2024

To: @parasyte

Sure, that's what I'm doing. Still need my server to write to specific clients, and there cannot be a "write" auth key enabled on the channel or else all the privacy breaks. At first, I had a "master" auth_key with write, but the mere existence of that, combined with the unusual pubnub security model meant all users could read from all channels.

from python.

geremyCohen avatar geremyCohen commented on September 9, 2024

Thanks for the feedback guys. If there is anything we can add to the SDK to make things smoother for you that you think others can also benefit from, please shoot us an email to [email protected], and we'll see about prioritizing it in a release for you.

from python.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.