authentic-client-es6-promises
Version:
Porting of authentic-client to ES6 & native promises
39 lines (29 loc) • 858 B
Markdown
This is a port of the authentic-client
[](https://github.com/davidguttman/authentic). This helps interact
with an [authentic-server](https://github.com/davidguttman/authentic-server) so
that you can easily signup, confirm, login, and change-password for users. It
will also help send tokens to microservices that require authentication.
```js
var Authentic = require('authentic-client-es6-promises')
var auth = Authentic({
server: 'https://auth.scalehaus.io'
})
var creds = {
email: 'chet@scalehaus.io',
password: 'notswordfish'
}
auth.login(creds).then(() => {
var url = 'https://reporting.scalehaus.io/report'
auth.get(url).then(rsp) {
let data = rsp.body
// show that report
console.log(data)
})
})
```
```
npm install --save authentic-client-es6-promises
```