@froice/border-control
A Node.js connector for Froice Identity Service
Last updated 2 years ago by siraglovale .
ISC · Original npm · Tarball · package.json
$ cnpm install @froice/border-control 
SYNC missed versions from official npm registry.

Border Control

What is border control

Border control is Froice Limited's solution to remote user management and group entitlement, it allows developers to restrict their applications to groups adding people to groups as they need.

Unfortunately it is not feasible to allow for developers to programatically create groups so that is restricted to our GUI which can be found at fuzz.froice.co.uk at our go live

How do I use it

Setting up

const BorderControl = require('@froice/border-control');

const b = new BorderControl({
  api: 'localhost:3001',
  secure: true // This configures whether to use https or http
});

Validating user against group

b.checkGroup(
  '<SECURE_JWT>',
  '<GROUP_NAME>',
  '<REMOTE_IP>'
).then(() => {
  console.log("AUTHORISED");
}).catch(err => {
  console.error("UNAUTHORISED");
})

Login a user

N.B. This will be deprecated in the next major version change in favour of a redirect methodology.

b.loginUser('<EMAIL>', '<PASSWORD>', '<REMOTE_IP>')
.then(() => {
  console.log('Login');
}).catch(() => {
  console.log('Reject');
})

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

5 Versions

  • 2.0.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 10
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |