You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/07 03:51:37 UTC

[GitHub] [pulsar] gaoran10 opened a new issue #10157: [WebSocket] Token authentication param optimization

gaoran10 opened a new issue #10157:
URL: https://github.com/apache/pulsar/issues/10157


   **Is your feature request related to a problem? Please describe.**
   
   Currently, the Pulsar WebSocket client uses token authentication like this.
   
   *javascript*
   ```
   var token = 'Bearer eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ0ZXN0LXVzZXIifQ';
   var url = "ws://localhost:8090/ws/v2/producer/persistent/public/default/ws-js";
   var ws = new WebSocket(url + '?token=' + token);
   ```
   
   *python*
   ```
   token = 'Bearer eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ0ZXN0LXVzZXIifQ
   token = urllib.parse.quote(token)
   url = 'ws://localhost:8090/ws/v2/consumer/persistent/public/default/ws-js/sub?token=' + token
   websocket.create_connection(url)
   ```
   
   The token value needs a prefix `Bearer `, this is inconvenient. We should find a way to remove the prefix `Bearer `.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat closed issue #10157: [WebSocket] Token authentication param optimization

Posted by GitBox <gi...@apache.org>.
merlimat closed issue #10157:
URL: https://github.com/apache/pulsar/issues/10157


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org