Skip to content

malach-it/boruta-client

Repository files navigation

logo-yellow

boruta client is an OAuth 2.0 client written in JavaScript/Typescript. It allows to interact with an OAuth 2.0 provider within javascript applications both on client and server sides.

Implementation

This library gives the ability to follow the OAuth 2.0 flows. Here is the current state of what is implemented.

  • client credentials
  • implicit grant
    • silent refresh impementation
  • code grant
  • resource owner password credentials grant
  • introspect
  • revoke

Installation

Installation can be performed with npm package manager from this repository (the code is to be released on the npm registry).

npm i https://github.com/malach-it/boruta-client.git

Usage

Client credentials

You have the ability to get tokens following the OAuth 2.0 client credentials flow as in the following example:

import { BorutaOauth } from 'boruta-client'

const oauth = new BorutaOauth({
  host: 'https://oauth.provider',
  tokenPath: '/oauth/token'
})

const client = new oauth.ClientCredentials({
  clientId: 'shinyClientId',
  clientSecret: 'shinyClientSecret'
})

client.getToken().then(console.log)

Code of Conduct

This product community follows the code of conduct available here

License

This code is released under the MIT license.

About

OAuth 2.0 client written in TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published