fix: fix OAuth error response (#835)

* fix: fix OAuth error response

* fix: provide more detailed error messages for TokenError
This commit is contained in:
aecra
2022-07-01 14:53:34 +08:00
committed by GitHub
parent aa5078de15
commit f0431701c9
5 changed files with 257 additions and 115 deletions

View File

@ -2194,6 +2194,18 @@
"schema": {
"$ref": "#/definitions/object.TokenWrapper"
}
},
"400": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/object.TokenError"
}
},
"401": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/object.TokenError"
}
}
}
}
@ -2285,6 +2297,18 @@
"schema": {
"$ref": "#/definitions/object.IntrospectionResponse"
}
},
"400": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/object.TokenError"
}
},
"401": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/object.TokenError"
}
}
}
}
@ -2377,6 +2401,18 @@
"schema": {
"$ref": "#/definitions/object.TokenWrapper"
}
},
"400": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/object.TokenError"
}
},
"401": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/object.TokenError"
}
}
}
}
@ -3063,11 +3099,11 @@
}
},
"definitions": {
"2200.0xc0003c4b70.false": {
"2127.0xc000398090.false": {
"title": "false",
"type": "object"
},
"2235.0xc0003c4ba0.false": {
"2161.0xc0003980c0.false": {
"title": "false",
"type": "object"
},
@ -3082,6 +3118,9 @@
"content": {
"type": "string"
},
"provider": {
"type": "string"
},
"receivers": {
"type": "array",
"items": {
@ -3182,10 +3221,10 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/2200.0xc0003c4b70.false"
"$ref": "#/definitions/2127.0xc000398090.false"
},
"data2": {
"$ref": "#/definitions/2235.0xc0003c4ba0.false"
"$ref": "#/definitions/2161.0xc0003980c0.false"
},
"msg": {
"type": "string"
@ -4209,6 +4248,18 @@
}
}
},
"object.TokenError": {
"title": "TokenError",
"type": "object",
"properties": {
"error": {
"type": "string"
},
"error_description": {
"type": "string"
}
}
},
"object.TokenWrapper": {
"title": "TokenWrapper",
"type": "object",
@ -4216,9 +4267,6 @@
"access_token": {
"type": "string"
},
"error": {
"type": "string"
},
"expires_in": {
"type": "integer",
"format": "int64"