1.0.8 • Published 5 years ago

oauth2-jwt v1.0.8

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Oauth2-JWT

1. Cài đặt

npm install oauth2-jwt

2. Tính năng

  • Hỗ trợ grants: authorization_code, client_credentials, refresh_token, password.
  • Sử dụng Promise, async await.

3. Cách sử dụng

3.1 Tạo instance oauth2-jwt

const Oauth2 = require('oauth2-jwt');
const oauth = new Oauth2(settings);
  • Parameter settings có các tham số như sau:
ParameterExampleDescriptionRequired
accessTokenPrivateKey"accesstoken"Access token private keytrue
refreshTokenPrivateKey"refreshtoken"Refresh token private keytrue
authorizationCodePrivateKey"authorizationcode"Authorization Code Private Keytrue
accessTokenLifeTime60 60 4 (second - default)true
refreshTokenLifeTime60 60 4 (second - default)true
authorizationCodeLifeTime60 60 4 (second - default)true
getUserfunctionFunction lấy thông tin usertrue
getApplicationfunctionFunction lấy thông tin applicationtrue
1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago