New to the group and a question.

#1

Hello Guys,

just joined the group as I am looking to implement autobahn in Android…
I have not yet done so but still I have a quick question:

How can I add a “basic authorize” header when I try to connect
to the specific path where the websocket push of data is located?

GET /v2/:utility/push HTTP/1.1
Host: theserver
Authorization: Basic dGVzdC11c2VyOnBhc3N3b3Jk
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13

Again Thank you for this great effort on implementing Websockets.. it really
makes the life of many of us easier!

Gustav

0 Likes

#2

Hello Guys,

just joined the group as I am looking to implement autobahn in Android...

Huh? You mean you want to reimplement AutobahnAndroid?

http://autobahn.ws/android

I have not yet done so but still I have a quick question:

How can I add a "basic authorize" header when I try to connect
to the specific path where the websocket push of data is located?

GET /v2/:utility/push HTTP/1.1
Host: theserver
Authorization: Basic dGVzdC11c2VyOnBhc3N3b3Jk
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13

Autobahn currently does not support HTTP authentication mechanisms. Those are of limited practical value with WS, since browsers don't
render user dialogs for subresources in a page, and WS counts as a
subresource.

In other words: if your WS stuff isn't coming from the same server:port
as the HTML page, you won't get a login dialog anyway ..

···

Am 13.09.2012 14:57, schrieb Gustav:

Again Thank you for this great effort on implementing Websockets.. it really
makes the life of many of us easier!

Gustav

0 Likes

#3

Hi Gustav,

your options (today) for auth:

1) Run Autobahn as a Resource within Twisted Web and do

http://twistedmatrix.com/documents/12.2.0/web/howto/web-in-60/http-auth.html

2) Use cookie based auth:

User needs to be authenticated already when the initial HTML page is
fetched. After login, that will set a cookie. You can then read the
cookie in Autobahn when the WS connection is established.

3) Use WAMP CRA auth:

See: https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/authentication

···

==

As said, Autobahn currently does not implement HTTP auth when
running standalone and for pure WS ..

Cheers,
Tobias

Am 13.09.2012 14:57, schrieb Gustav:

Hello Guys,

just joined the group as I am looking to implement autobahn in Android...
I have not yet done so but still I have a quick question:

How can I add a "basic authorize" header when I try to connect
to the specific path where the websocket push of data is located?

GET /v2/:utility/push HTTP/1.1
Host: theserver
Authorization: Basic dGVzdC11c2VyOnBhc3N3b3Jk
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13

Again Thank you for this great effort on implementing Websockets.. it really
makes the life of many of us easier!

Gustav

0 Likes

#4

Hi Tobias,

Oh I am sorry that I did not express myself correctly… of course I dont want to reimplement anything… LOL

But there is is this Rest Service that requires Auth which also then implements a websocket for
constant push of data…

I just need to implement the client and then do whatever with the data I receive…

Thanks
G

···

On Thursday, September 13, 2012 8:57:35 AM UTC-4, Gustav wrote:

Hello Guys,

just joined the group as I am looking to implement autobahn in Android…
I have not yet done so but still I have a quick question:

How can I add a “basic authorize” header when I try to connect
to the specific path where the websocket push of data is located?

GET /v2/:utility/push HTTP/1.1
Host: theserver
Authorization: Basic dGVzdC11c2VyOnBhc3N3b3Jk
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13


Again Thank you for this great effort on implementing Websockets.. it really
makes the life of many of us easier!

Gustav


0 Likes