项目作者: czystyl

项目描述 :
OAuth Client
高级语言: JavaScript
项目地址: git://github.com/czystyl/oauth-client.git
创建时间: 2017-12-30T21:27:36Z
项目社区:https://github.com/czystyl/oauth-client

开源协议:MIT License

下载


alt text

OAuth Client

Http client based on Axios for using with oauth server.

Pre requirements

Before use You need to provide set environment variable:

  • APIURL - baseUrl for Axios instance
  • TOKEN_ENDPOINT - OAuth server endpoint
  • CLIENT_ID - OAuth client id
  • CLIENT_SECRET - OAuth client client_secret

Usage

Usage is the same like using clean axios, see example here

Remember to set environment variable before use client

Features

  • Adding token to each request
  • Using refresh token
  • Getting token
  • Tokens are stored in memory and localStorage