项目作者: kazuhisya

项目描述 :
OAuth2 demo server for "Resource Owner Password Credentials Grant"
高级语言: Go
项目地址: git://github.com/kazuhisya/oauth2-demo-ropc.git
创建时间: 2019-02-07T05:31:31Z
项目社区:https://github.com/kazuhisya/oauth2-demo-ropc

开源协议:

下载


OAuth2 demo server

for Resource Owner Password Credentials Grant

  1. $ curl "http://localhost:9096/token?grant_type=password&client_id=APP01&client_secret=APPSEC&username=admin&password=123456" | jq
  2. {
  3. "access_token": "DVWMV9ZQPTOE-BQUHZHCVA",
  4. "expires_in": 120,
  5. "token_type": "Bearer"
  6. }
  1. $ curl "http://localhost:9096/test?access_token=DVWMV9ZQPTOE-BQUHZHCVA" | jq
  2. {
  3. "client_id": "APP01",
  4. "expires_in": 97,
  5. "user_id": "000000"
  6. }