Expand my Community achievements bar.

Authentication Basics

Avatar

Level 1

I'm attempting to create a room and authenticate users on my server, and then forward them on to a room. I'm able to get an authentication token that looks like "exx=ffdadfasfdsafdfadfsafaetc=", but am not sure where to go from here.  The SDK says the next step is to "provide the client application with the authToken." 

My questions are

- How do I give the room the authentication token and send a user to it?

- What exactly is the userid that is used when creating an authentication token?

1 Reply

Avatar

Employee

1) How do you give the room the authentication token ?

You pass the return value as is ( "exx=...." ) to your Flex

application (for example as a FlashVars parameter) and in your Flex

application you use it to initialize the authenticator (authToken in

the example that follows is the value received from your server-side

app) :

<rtc:AdobeHSAuthenticator authenticationKey="" id="auth"/>

2) what exactly is the userid ?

It's whatever you want it to be

Userid should be a unique value in your account (or at least in your

room / room session) and it should be something that is meaningful to

your server-side application.

For example if you are using a database to store your users, userid

can be the unique id you use in your database, or a guid that you can

use if you need to associate an AFCS user with a user on your server.

If you don't need to be able to get back from an AFCS user to one of

your user you can, for example, make your userid as the hash of the

username / email address that you used for authentication.

Again, from AFCS point of you any value is good (as long as is a

valid "id", i.e. letter / numbers / _ etc.)