Noteworthy Programming Masterpiece

    @lskjs/auth

    2.84.11 • Public • Published

    LSK.js – auth

    @lskjs/auth – LSK.js – auth – module for authorization by login and password and singup through social networks

    LSK logo NPM version NPM downloads NPM Dependency count Have TypeScript types Have tree shaking NPM Package size Package size Ask us in Telegram


    Table of contents

    ⌨️ Install

    # yarn
    yarn i @lskjs/auth @lskjs/db @lskjs/mobx @lskjs/server-api axios bluebird js-cookie lodash mobx
    
    # npm
    npm i @lskjs/auth @lskjs/db @lskjs/mobx @lskjs/server-api axios bluebird js-cookie lodash mobx

    достал из chat.server.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: () => {}
       }
     }

    📖 License

    This project is licensed under the MIT License - see the LICENSE file for details

    👥 Contributors


    Igor Suvorov

    💻 🎨 🤔

    👏 Contributing

    1. Fork it (https://github.com/yourname/yourproject/fork)
    2. Create your feature branch (git checkout -b features/fooBar)
    3. Commit your changes (git commit -am 'feat(image): Add some fooBar')
    4. Push to the branch (git push origin feature/fooBar)
    5. Create a new Pull Request

    📮 Any questions? Always welcome :)

    Install

    npm i @lskjs/auth

    DownloadsWeekly Downloads

    76

    Version

    2.84.11

    License

    MIT

    Unpacked Size

    394 kB

    Total Files

    57

    Last publish

    Collaborators

    • isuvorov
    • yukioru
    • andru_xa
    • natavts
    • blacklightburn
    • ga2mer
    • iburey
    • kafkae
    • sophiyabezruk
    • vladik_deniska
    • finalgetname