refactor: mp.auth
This commit is contained in:
445
openapi/clientapi/mp/auth/auth.swagger.json
Normal file
445
openapi/clientapi/mp/auth/auth.swagger.json
Normal file
@@ -0,0 +1,445 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "clientapi/mp/auth/auth.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "AuthService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/weixin/mp/auth/clientcredential": {
|
||||
"get": {
|
||||
"operationId": "AuthService_GetClientCredential",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/authGetClientCredentialResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"AuthService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/weixin/mp/auth/token": {
|
||||
"get": {
|
||||
"operationId": "AuthService_ExchangeToken",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/authExchangeTokenResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "code",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AuthService"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "AuthService_RefreshToken",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/authRefreshTokenResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/authRefreshTokenRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AuthService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/weixin/mp/auth/url": {
|
||||
"get": {
|
||||
"operationId": "AuthService_GetCodeURL",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/authGetCodeURLResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "redirectUrl",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "state",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "scope",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"snsapi_base",
|
||||
"snsapi_userinfo"
|
||||
],
|
||||
"default": "snsapi_base"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AuthService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/weixin/mp/auth/userinfo": {
|
||||
"get": {
|
||||
"operationId": "AuthService_GetUserinfo",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/authGetUserinfoResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "openId",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lang",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"zh_CN",
|
||||
"zh_TW",
|
||||
"en"
|
||||
],
|
||||
"default": "zh_CN"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AuthService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/weixin/mp/auth/userinfo/sync": {
|
||||
"get": {
|
||||
"summary": "synchronize userinfo when its updated",
|
||||
"operationId": "AuthService_SyncUserinfo",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/authSyncUserinfoResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "openId",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lang",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"zh_CN",
|
||||
"zh_TW",
|
||||
"en"
|
||||
],
|
||||
"default": "zh_CN"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AuthService"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"GetCodeURLRequestScope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"snsapi_base",
|
||||
"snsapi_userinfo"
|
||||
],
|
||||
"default": "snsapi_base"
|
||||
},
|
||||
"authClientCredential": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accessToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"expiresIn": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authExchangeTokenResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"$ref": "#/definitions/authToken"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authGetClientCredentialResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"clientCredential": {
|
||||
"$ref": "#/definitions/authClientCredential"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authGetCodeURLResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authGetUserinfoRequestLang": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"zh_CN",
|
||||
"zh_TW",
|
||||
"en"
|
||||
],
|
||||
"default": "zh_CN"
|
||||
},
|
||||
"authGetUserinfoResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"userinfo": {
|
||||
"$ref": "#/definitions/authUserinfo"
|
||||
},
|
||||
"createdTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authRefreshTokenRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"openId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authRefreshTokenResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"$ref": "#/definitions/authToken"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authSyncUserinfoRequestLang": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"zh_CN",
|
||||
"zh_TW",
|
||||
"en"
|
||||
],
|
||||
"default": "zh_CN"
|
||||
},
|
||||
"authSyncUserinfoResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"userinfo": {
|
||||
"$ref": "#/definitions/authUserinfo"
|
||||
},
|
||||
"createdTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authToken": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accessToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"expiresIn": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"refreshToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"openId": {
|
||||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authUserinfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"openId": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickName": {
|
||||
"type": "string"
|
||||
},
|
||||
"sex": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"province": {
|
||||
"type": "string"
|
||||
},
|
||||
"city": {
|
||||
"type": "string"
|
||||
},
|
||||
"country": {
|
||||
"type": "string"
|
||||
},
|
||||
"headImgUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"privilege": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"unionId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user