Code Monkey home page Code Monkey logo

examples's People

Contributors

cv65kr avatar dependabot[bot] avatar fzambia avatar hixon10 avatar smyja avatar steevenhu avatar synw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

examples's Issues

Django example raises TypeError

I'm trying to test centrifugo for use in my django app, but the example django app is taking me for a ring-around-the-rosy, raising this error...

Environment:


Request Method: GET
Request URL: http://localhost:8080/

Django Version: 1.6.10
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'core',
 'adjacent')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  137.                 response = response.render()
File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in render
  105.             self.content = self.rendered_content
File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in rendered_content
  81.         context = self.resolve_context(self.context_data)
File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in resolve_context
  159.         return RequestContext(self._request, context, current_app=self._current_app)
File "/usr/local/lib/python2.7/dist-packages/django/template/context.py" in __init__
  169.             self.update(processor(request))
File "/usr/local/lib/python2.7/dist-packages/adjacent/context_processors.py" in main
  6.     params = get_connection_parameters(request.user)
File "/usr/local/lib/python2.7/dist-packages/adjacent/utils.py" in get_connection_parameters
  15.         info=info
File "/usr/local/lib/python2.7/dist-packages/cent/core.py" in generate_token
  35.     sign.update(six.b(info))
File "/usr/lib/python2.7/hmac.py" in update
  83.         self.inner.update(msg)

Exception Type: TypeError at /
Exception Value: must be string or buffer, not None

config.yaml

{
  "project_name": "development",
  "project_secret": "secret",
  "project_namespaces": [
    {
      "name": "public",
      "publish": true,
      "watch": true,
      "presence": true,
      "join_leave": true,
      "history_size": 10,
      "history_lifetime": 30
    }
  ],
  "log_level": "debug"
}


CENTRIFUGE vars in settings.py

CENTRIFUGE_ADDRESS = 'http://localhost:8000'
CENTRIFUGE_PROJECT_KEY =  'development'
CENTRIFUGE_PROJECT_SECRET = 'secret'
CENTRIFUGE_TIMEOUT = 5

It's been a long day. Perhaps I'm doing something wrong...will keep looking...but sure would be nice to have a functioning demo.

Centrifugo subscribe to mutiple channel issue

I am trying to subscribe to multiple tokens using centrifugo but I am getting some issue:

  1. If I remove the setTimeout function it doesn't connect and give error as couldn't connect. Do I need to compulsory use setTimeOut in case of subscription to multiple tokens?
  2. On using with setTimeout each time I get the last channel name instead of current channel ? Here's the link to code Code sample

Please help out me with this as I have referred this centrifugal/centrifuge#50 but still it's not working perfectly for me.

Thanks in advance!

Golang wasm client for sdk v5

hey all,

@FZambia hope all is well in your new home !!

congrats on the new v5 api. It sure looks good from what I can see so far..

Do you think it’s possible with the new v5 sdk to do a golang wasm PWA style Client ?

This is where we have the web manifest and service worker code . Then it’s just golang compilation to wasm and that’s basically it I hope :)

protobufs and wasm might be a problem . Not sure as I have not yet deeply looked into the new v5 sdk.

Keycloak example question

Hi, this is more of a question than an issue: How would you obtain a channel JWT authorization in the Keycloak example? As there's no token_hmac_secret_key configured I'm wondering if

  1. That token should be created by Keycloak?
  2. The token_hmac_secret_key should be configured additionally and a backend service should use it to create the JWT?
  3. The connection token from Keycloak should already contain the channels claim and be reused as channel JWT?

Thx in advance.

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.