How to set/update site username

14 views
Skip to first unread message

nvd_ai

unread,
Jul 6, 2011, 7:24:55 PM7/6/11
to opencoweb
Hi,

I have a hard time figuring out how can I modify the username through
a provided API. Attendance is read-only and does not provide any API
that a local site can update its name so other sites receive the
update.

In CowebX comap example there are usernames such as 'user3120' which I
could not find where in the .js code are they generated. Are these
generated on the server side?

The solution should be very easy. Am I missing something?

Navid


Peter Parente

unread,
Jul 6, 2011, 8:13:21 PM7/6/11
to open...@googlegroups.com
Hi Navid,

There is no JS API to set the trusted usernames for security reasons.
These are determined by the user's authentication with the server and
broadcast by the trusted server to all users in a session. If there
were a JS API to set trusted usernames, any user could spoof any other
user's name. For example, I could invoke the method to say I'm "navid"
and no one would be the wiser.

If you want to use untrusted usernames in your app, sync them like any
other data and include them in the state for late joiners.

Pete

--
Pete

nvd_ai

unread,
Jul 6, 2011, 8:28:36 PM7/6/11
to opencoweb
Thanks Peter.

In fact, before I look for any JS API, I tried to use session.login()
with no success because I could not figure out where /login service is
deployed. All I got was 404. Does coWeb implement any server side
authentication system?
--If it does, is it deployed when I run the server? where is it
deployed?
--If it does not, how should I pass the credentials from my local
server to coweb?

BTW, I am running coweb Java server using mvn jetty:run-exploded.

Navid
Reply all
Reply to author
Forward
0 new messages