@indec/heimdall

0.2.9 • Public • Published

Heimdall

Installation

npm install @indec/heimdall

Configuration

Add the following environment variables:

AUTH_ENDPOINT=http://localhost:5000
AUTH_CLIENT_ID=<your app client_id>
AUTH_CLIENT_SECRET=<your app secret>
GRANT_TYPE=client_credentials

Examples

Login on client side

import {LoginService} from '@indec/heimdall/client';

// ENDPOINT constant is your heimdall server. i.e: http://localhost:5000
const loginService = new LoginService(ENDPOINT);
const token = await loginService.login(username, password);

Clean user session

import {TokenService} from '@indec/heimdall/client';

TokenService.clear();

Listing users

List your app's users on server side:

const {UserService} = require('@indec/heimdall').services;

try {
    const users = await UserService.fetchAll();
    console.log(users);
} catch (err) {
    console.error(err);
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.90latest
0.2.8-next.00next
0.2.7-next.00next-0.2
0.0.1-beta.90zero-beta

Version History

VersionDownloads (Last 7 Days)Published
0.2.90
0.2.80
0.2.8-next.10
0.2.8-next.00
0.2.70
0.2.7-next.00
0.2.60
0.2.50
0.2.40
0.0.1-beta.90
0.0.1-beta.80
0.2.31
0.2.20
0.2.10
0.2.00
0.1.00
0.0.1-beta.70
0.0.1-beta.60
0.0.1-beta.50
0.0.1-beta.40
0.0.1-beta.30
0.0.1-beta.20
0.0.1-beta.11
0.0.1-beta.00

Package Sidebar

Install

npm i @indec/heimdall

Weekly Downloads

2

Version

0.2.9

License

MIT

Unpacked Size

20.6 kB

Total Files

19

Last publish

Collaborators

  • dmiglierini
  • mforlenza