node-red/node-red-auth-twitter

Name: node-red-auth-twitter

Owner: node-red

Description: A Twitter authentication plugin for Node-RED

Created: 2017-04-12 09:13:46.0

Updated: 2017-08-15 18:49:13.0

Pushed: 2018-02-23 23:18:29.0

Homepage: null

Size: 11

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Node-RED Authentication with Twitter

Node-RED plugin for authenticating users with Twitter.

This modules lets you restrict access to the Node-RED editor to specific Twitter users.

Note: this requires Node-RED 0.17 or later

Install

In your Node-RED user directory, typically ~/.node-red:

$ npm install node-red/node-red-auth-twitter
Usage
Create a new Twitter application

To enable access control with Twitter, you must first create a new application on your Twitter account.

Once created, you will be provided a Consumer Key and Consumer Secret that you will need to use to configure the authentication plugin.

Configure adminAuth

Access control for the Node-RED editor is configured in your settings.js file using the adminAuth property.

adminAuth: require('node-red-auth-twitter')({
    consumerKey: TWITTER_CONSUMER_KEY,
    consumerSecret: TWITTER_CONSUMER_SECRET,
    baseURL: "http://localhost:1880/",
    users: [
       { username: "knolleary",permissions: ["*"]}
    ]
})

The baseURL property is the URL used to access the Node-RED editor.

The users property is the list of Twitter users who are allowed to access the editor. It is the same as used by adminAuth as described in the security documentation, but without the password property.

A default user can be specified by adding a default property to the options object:

    users: [
       ...
    ],
    default: {
        permissions: "read"
    }
Copyright and license

Copyright JS Foundation and other contributors, http://js.foundation under the Apache 2.0 license.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.