Skip to content

8log/keycloak-request-token

 
 

Repository files navigation

keycloak-request-token

Coverage Status Build Status Known Vulnerabilities dependencies Status

NPM

A simple module to request an Access Token from a Keycloak Server.

Project Info
License: Apache-2.0
Build: make
Documentation: http://bucharest-gold.github.io/keycloak-request-token/
Issue tracker: https://github.com/bucharest-gold/keycloak-request-token/issues
Engines: Node.js 4.x, 6.x, 8.x

Installation

npm install keycloak-request-token -S

Usage

'use strict';

const tokenRequester = require('keycloak-request-token');

const baseUrl = 'http://127.0.0.1:8080/auth';
const settings = {
    username: 'admin',
    password: 'admi',
    grant_type: 'password',
    client_id: 'admin-cli'
};

tokenRequester(baseUrl, settings)
  .then((token) => {
    console.log(token);
  }).catch((err) => {
    console.log('err', err);
  });

Contributing

Please read the contributing guide

Reporting security vulnerabilities

If you've found a security vulnerability, please look at the instructions on how to properly report it

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 78.8%
  • Shell 18.8%
  • Makefile 2.4%