Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix create_or_update_resource controller and oauth2 admin api schema for 1.0 #203

Open
wants to merge 1 commit into
base: 3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions lib/kong-schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -2230,9 +2230,12 @@ var schemas = {
type: 'string',
description: "You can optionally set your own unique client_secret. If missing, the plugin will generate one.",
},
redirect_uri: {
type: 'string',
description: "The URL in your app where users will be sent after authorization (RFC 6742 Section 3.1.2).",
redirect_uris: {
type: 'array',
items: {
type: "string"
},
description: "An array with one or more URLs in your app where users will be sent after authorization (RFC 6742 Section 3.1.2).",
}
}
},
Expand Down Expand Up @@ -2675,9 +2678,12 @@ var schemas = {
type: 'string',
description: "You can optionally set your own unique client_secret. If missing, the plugin will generate one.",
},
redirect_uri: {
type: 'string',
description: "The URL in your app where users will be sent after authorization (RFC 6742 Section 3.1.2).",
redirect_uris: {
type: 'array',
items: {
type: "string"
},
description: "An array with one or more URLs in your app where users will be sent after authorization (RFC 6742 Section 3.1.2).",
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@
switch(resourceType) {
case 'acl':
vm.title = 'Add Consumer "' + (parent.username || parent.custom_id) + '" to a Group.';
vm.resource.consumer_id = parent.id;
break;
case 'API':
vm.title = resource ? 'Update API' : 'Create API';
break;
case 'basic-auth-credential':
vm.title = resource ? 'Update credential' : 'Create basic auth credential for Consumer "' + (parent.username || parent.custom_id) + '"';
delete vm.schema.properties.consumer_id;
vm.resource.consumer_id = parent.id;
break;
case 'certificate':
vm.title = resource ? 'Update Certificate' : 'Create Certificate';
Expand All @@ -38,21 +36,17 @@
break;
case 'hmac-credential':
vm.title = resource ? 'Update credential' : 'Create HMAC credential for Consumer "' + (parent.username || parent.custom_id) + '"';
vm.resource.consumer_id = parent.id;
break;
case 'jwt-credential':
vm.title = 'Create a JWT for Consumer "' + (parent.username || parent.custom_id) + '"';
vm.resource.consumer_id = parent.id;
break;
case 'auth-key':
vm.title = resource ? 'Update Key' : 'Create a Key for Consumer "' + (parent.username || parent.custom_id) + '"';
delete vm.schema.properties.consumer_id;
vm.resource.consumer_id = parent.id;
break;
case 'oauth2-credential':
vm.title = resource ? 'Update Oauth2 credential' : 'Create an oauth2 credential for Consumer "' + (parent.username || parent.custom_id) + '"';
delete vm.schema.properties.consumer_id;
vm.resource.consumer_id = parent.id;
break;
case 'plugin':
vm.title = resource ? 'Update Plugin' : 'Create Plugin';
Expand Down