Bearer Token Authentication

#1

Can I use bearer tokens to authenticate users? Is it true way?

I’m using node.js for my REST API and pass a token through HTTP Authorization header. Can I use a similar approach when I use AutobahnJs?

0 Likes

#2

Hi Andrey,

Can I use bearer tokens to authenticate users? Is it true way?
I'm using node.js for my REST API and pass a token through HTTP
Authorization header. Can I use a similar approach when I use AutobahnJs?

AutobahnJS and Crossbar.io supports Ticket-based authentication.

Here is a complete example:

https://github.com/crossbario/crossbarexamples/tree/master/authenticate/ticketdynamic/python

The Crossbar.io config

https://github.com/crossbario/crossbarexamples/blob/master/authenticate/ticketdynamic/python/.crossbar/config.json#L80

tells frontend clients to authenticate using "ticket"s, and it configures Crossbar.io to call the WAMP procedure

com.example.authenticate

to actually verify tickets.

This authenticator procedure in this example is written in Python

https://github.com/crossbario/crossbarexamples/blob/master/authenticate/ticketdynamic/python/authenticator.py#L48

but you can write your authenticator in _any WAMP supported language_!

That is, you might be able to reuse your existing Node code for verifying tickets.

Does that make sense / is that what you are looking for?

/Tobias

···

Am 30.12.2014 um 18:31 schrieb Andrey Olefirenko:

0 Likes

#3

Thanks for the quick reply! I should to try this

···

вторник, 30 декабря 2014 г., 20:31:08 UTC+3 пользователь Andrey Olefirenko написал:

Can I use bearer tokens to authenticate users? Is it true way?

I’m using node.js for my REST API and pass a token through HTTP Authorization header. Can I use a similar approach when I use AutobahnJs?

0 Likes

#4

Looks like we might another point of thanks for implementing ticket-based auth in WAMP Advanced Profile/Crossbar. Andrey, if this works for you, you need to buy Tobias a beer (like I did). ;^)

Dave

···

On Tuesday, December 30, 2014 1:15:54 PM UTC-5, Andrey Olefirenko wrote:

Thanks for the quick reply! I should to try this

0 Likes