Share-Auth

36 views
Skip to first unread message

crypticswarm

unread,
Apr 15, 2012, 4:24:22 AM4/15/12
to sha...@googlegroups.com
Hi Everyone,

I just pushed up a repo that helps create Auth functions for share-js. (https://github.com/CrypticSwarm/sharejs-auth)

It is a pattern matching based authorization system.  

Depending on what action type is currently being handled it will grab these three things and put them into a single object:
The session of the user who submitted the operation (from a connect based session store).
When applicable it will also grab a snapshot of the doc (in the case of update, read, delete).
The operation (in the case of update).

This allows a user of the module to define patterns that determine whether the action should be accepted or rejected.  Can check the credentials of the user who submitted the ops.
 Can also inspect the contents of the document to determine if the operation should be accepted.

Since it is data that is determining how to accept or reject, it can be modified at runtime.

--CrypticSwarm
Reply all
Reply to author
Forward
0 new messages