@fhyx/ssod
SSOd client with nodejs
Last updated 25 days ago by fuyiz .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install @fhyx/ssod 
SYNC missed versions from official npm registry.

SSOd client

Environments

cat .env

SSOD_GRPC_ADDR="local.phoenixincloud.net:3012"
#SSOD_GRPC_CA="./certs/ca.crt"
#SSOD_GRPC_CLIENT_CRT="./certs/client.crt"
#SSOD_GRPC_CLIENT_KEY="./certs/client.key"
#SSOD_GRPC_SERVER_NAME="ssod.phoenixincloud.net"
#DEBUG=grpcHelper:lb,grpcHelper:client,grpcHelper:naming,grpcHelper:helper,ssod:client,ssod:sanit

Development

npm i -g foreman

Testing

nf run npm run test

Example

const { SiteLocal: site, Client } = require('ssod');

async function login(username, password) {
    let client = await Client()
    let {user, token} = await client.login({username, password, site})
    console.log('name', user.name, 'id#', user.id, 'guid', user.guid)
    ...
}

Development database

docker run --name sso-db \
	-e DB_NAME=sso -e DB_USER=sso -e DB_PASS=develop -e TZ=Hongkong \
	-d fhyx/sso-db
docker run --name ssod-rpc \
	 -e 'SSOD_STORE_DSN=postgres://sso:develop@sso-db/sso?sslmode=disable' \
	 --link sso-db \
	 -p 3012:3012 \
	 -d fhyx/ssod ssod-rpc

这个是本地测试用的环境,然后配置的环境变量里,只需要有SSOD_GRPC_ADDR即可,证书不用加!

Current Tags

  • 0.7.1                                ...           latest (25 days ago)

15 Versions

  • 0.7.1                                ...           25 days ago
  • 0.7.0                                ...           9 months ago
  • 0.6.11                                ...           a year ago
  • 0.6.10                                ...           a year ago
  • 0.6.9                                ...           a year ago
  • 0.6.8                                ...           a year ago
  • 0.6.4                                ...           a year ago
  • 0.5.2                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.12                                ...           a year ago
  • 0.3.11                                ...           a year ago
  • 0.3.10                                ...           a year ago
  • 0.3.9                                ...           a year ago
  • 0.3.8                                ...           a year ago
  • 0.3.6                                ...           a year ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 2
Last Month 50
Dependencies (12)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |