https://github.com/lskjs/lsk-auth
LSK Auth module
https://github.com/lskjs/lsk-auth
authentication isomorphic javascript lsk module nodejs react universal
Last synced: 2 months ago
JSON representation
LSK Auth module
- Host: GitHub
- URL: https://github.com/lskjs/lsk-auth
- Owner: lskjs
- License: mit
- Created: 2017-05-05T11:29:16.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T13:39:48.000Z (over 7 years ago)
- Last Synced: 2025-03-11T08:50:37.582Z (over 1 year ago)
- Topics: authentication, isomorphic, javascript, lsk, module, nodejs, react, universal
- Language: JavaScript
- Homepage: https://lsk.mgbeta.ru/auth
- Size: 225 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# LSK Auth
# достал из chat.server.js
```js
Message.getRole(userId) -> owner
Message.is('owner') // ?
Message.roles = {
owner: {
read: ['title', 'createdAt'], // all
write: ['user, 'owner'] // info
}
guest: {
read: ['title', 'createdAt'], // all
write: ['user, 'owner'] // null
}
validate params
1) OWNER
2) Public
Message.isOwner = (userId) => { this.ownerId } ['content']
Message.canWrite = ['content']
MEssage.canWrite = ['content']
schema = {
title: {
canWrite: () => {}
}
}
```