diff --git a/apidef/oas/schema/x-tyk-api-gateway.json b/apidef/oas/schema/x-tyk-api-gateway.json index f99f7fb6a05..2efd81bc2ec 100644 --- a/apidef/oas/schema/x-tyk-api-gateway.json +++ b/apidef/oas/schema/x-tyk-api-gateway.json @@ -96,7 +96,7 @@ "type": "boolean" }, "name": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" } }, "required": [ @@ -2026,10 +2026,10 @@ "$ref": "#/definitions/X-Tyk-AuthSource" }, "username": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "password": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" } }, "required": [ @@ -2062,13 +2062,13 @@ "type": "object", "properties": { "clientId": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "clientSecret": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "tokenUrl": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "scopes": { "type": [ @@ -2096,13 +2096,13 @@ "type": "object", "properties": { "clientId": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "clientSecret": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "tokenUrl": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "scopes": { "type": [ @@ -2111,10 +2111,10 @@ ] }, "username": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "password": { - "type": "string" + "$ref": "#/definitions/X-Tyk-NonEmptyString" }, "header": { "$ref": "#/definitions/X-Tyk-AuthSource" @@ -2139,7 +2139,10 @@ "enabled", "allowedAuthorizeTypes" ] + }, + "X-Tyk-NonEmptyString": { + "type": "string", + "pattern": "\\S+" } - } } \ No newline at end of file diff --git a/apidef/oas/upstream.go b/apidef/oas/upstream.go index aa1264299a5..84e503a6061 100644 --- a/apidef/oas/upstream.go +++ b/apidef/oas/upstream.go @@ -694,9 +694,6 @@ type ClientCredentials struct { TokenURL string `bson:"tokenUrl" json:"tokenUrl"` // Scopes specifies optional requested permissions. Scopes []string `bson:"scopes,omitempty" json:"scopes,omitempty"` - // HeaderName is the custom header name to be used for OAuth client credential flow authentication. - // Defaults to `Authorization`. - HeaderName string `bson:"headerName" json:"headerName"` // ExtraMetadata holds the keys that we want to extract from the token and pass to the upstream. ExtraMetadata []string `bson:"extraMetadata" json:"extraMetadata,omitempty"` }