Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tng/soa-node-auth

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tng/soa-node-auth

SOA-ORG for Node ================

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

SOA-ORG for Node

安装

yarn add @tng/soa-node-auth

request 模块

  • https://github.com/teambition/tws-auth
  • https://github.com/teambition/node-teambition

使用

const SOAAuth = require('@tng/soa-node-auth')
const TWSAuth = require('tws-auth')
const Teambition = require('teambition')

// use tws-auth
let twsAuth = new TWSAuth({ ... })
let soaorg = new SOAOrg({ twsAuth: twsAuth })

// use teambition
let teambition = new Teambition({ ... })
let soaauth = new SOAAuth({ teambition: teambition })

let auth = yield soaauth.apps().authorize().getAccessToken()
console.log(auth)

// set timeout
let auth = yield soaorg.apps().authorize().getAccessToken({
  timeout: 5000
})
console.log(auth)

测试

npm test

接口

auth

  • apps()

    • .authorize().getAccessToken(): 返回Auth认证授权后的AccessToken
    • .verify().token().valid(): 验证应用的 access_token
  • auths()

    • .active(): 激活应用授权
    • .statistics().list(): 返回一个应用被用户使用的统计信息
    • .search(): 返回一个应用被用户使用的具体信息
    • .list(): 根据resouceID和resourceType返回相关授权
    • .remove(): 删除用户授权
    • .expired().update(): 更新应用授权过期时间
    • .name().update(): 更新应用授权Name
    • .policies().update(): 更新应用授权范围

FAQs

Package last updated on 10 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc