Skip to content

Commit 6bb941b

Browse files
Merge pull request #54618 from nextcloud/fix/oauth2/limit-getToken-grant_type-values
2 parents 3c1dc00 + 1b4722c commit 6bb941b

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

apps/oauth2/lib/Controller/OauthApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct(
5454
/**
5555
* Get a token
5656
*
57-
* @param string $grant_type Token type that should be granted
57+
* @param 'authorization_code'|'refresh_token' $grant_type Token type that should be granted
5858
* @param ?string $code Code of the flow
5959
* @param ?string $refresh_token Refresh token
6060
* @param ?string $client_id Client ID

apps/oauth2/openapi.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@
128128
"properties": {
129129
"grant_type": {
130130
"type": "string",
131+
"enum": [
132+
"authorization_code",
133+
"refresh_token"
134+
],
131135
"description": "Token type that should be granted"
132136
},
133137
"code": {

openapi.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22834,6 +22834,10 @@
2283422834
"properties": {
2283522835
"grant_type": {
2283622836
"type": "string",
22837+
"enum": [
22838+
"authorization_code",
22839+
"refresh_token"
22840+
],
2283722841
"description": "Token type that should be granted"
2283822842
},
2283922843
"code": {

0 commit comments

Comments
 (0)