Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-1020 (pull request #249)
Browse files Browse the repository at this point in the history
Bugfix/SHIBUI-1020

Approved-by: Jonathan Johnson <jj@scaldingspoon.com>
Approved-by: Ryan Mathis <rmathis@unicon.net>
  • Loading branch information
rmathis committed Nov 30, 2018
2 parents a568b32 + cec26af commit 757217a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 161 deletions.
104 changes: 35 additions & 69 deletions backend/src/main/resources/dynamic-http-metadata-provider.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"type": "object",
"required": [
"xmlId",
"metadataURL"
"metadataURL",
"metadataRequestURLConstructionScheme"
],
"properties": {
"enabled": {
Expand All @@ -20,6 +21,39 @@
},
"metadataRequestURLConstructionScheme": {
"type": "object",
"required": [
"@type",
"content"
],
"anyOf": [
{
"properties": {
"@type": {
"enum": [
"Regex"
]
}
},
"required": [
"@type",
"content",
"match"
]
},
{
"properties": {
"@type": {
"enum": [
"MetadataQueryProtocol"
]
}
},
"required": [
"@type",
"content"
]
}
],
"properties": {
"@type": {
"title": "label.md-request-type",
Expand All @@ -35,12 +69,6 @@
],
"description": "value.md-query-protocol"
},
{
"enum": [
"Template"
],
"description": "value.template"
},
{
"enum": [
"Regex"
Expand All @@ -54,67 +82,6 @@
"description": "tooltip.md-request-value",
"type": "string"
},
"transformRef": {
"title": "label.transform-ref",
"description": "tooltip.transform-ref",
"type": "string",
"visibleIf": {
"content": [
""
]
}
},
"encodingStyle": {
"title": "label.encoding-style",
"description": "tooltip.encoding-style",
"type": "string",
"widget": {
"id": "select"
},
"default": "FORM",
"oneOf": [
{
"enum": [
"NONE"
],
"description": "None"
},
{
"enum": [
"FORM"
],
"description": "Form"
},
{
"enum": [
"PATH"
],
"description": "Path"
},
{
"enum": [
"FRAGMENT"
],
"description": "Fragment"
}
],
"visibleIf": {
"@type": [
"Template"
]
}
},
"velocityEngine": {
"title": "label.velocity-engine",
"description": "tooltip.velocity-engine",
"type": "string",
"default": "shibboleth.VelocityEngine",
"visibleIf": {
"@type": [
"Template"
]
}
},
"match": {
"title": "label.match",
"description": "tooltip.match",
Expand Down Expand Up @@ -638,7 +605,6 @@
"title": "label.certificate-file",
"description": "tooltip.certificate-file",
"type": "string",
"widget": "textarea",
"default": ""
}
},
Expand Down
16 changes: 1 addition & 15 deletions ui/src/app/metadata/provider/model/dynamic-http.provider.form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,7 @@ export const DynamicHttpMetadataProviderWizard: Wizard<DynamicHttpMetadataProvid
...BaseMetadataProviderEditor,
label: 'DynamicHttpMetadataProvider',
type: 'DynamicHttpMetadataResolver',
bindings: {
'/metadataRequestURLConstructionScheme/@type': [
{
'input': (event, property: FormProperty) => {
let transform = property.parent.getProperty('transformRef');
let content = property.parent.getProperty('content');
if (!content.value && property.value !== 'Regex') {
transform.setVisible(true);
} else {
transform.setVisible(false);
}
}
}
]
},
bindings: {},
getValidators(namesList: string[] = [], xmlIdList: string[] = []): any {
const validators = BaseMetadataProviderEditor.getValidators(namesList);
validators['/xmlId'] = (value, property, form) => {
Expand Down
114 changes: 37 additions & 77 deletions ui/src/assets/schema/provider/dynamic-http.schema.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"type": "object",
"order": [
"xmlId",
"metadataURL"
],
"required": [
"xmlId",
"metadataURL"
"metadataURL",
"metadataRequestURLConstructionScheme"
],
"properties": {
"enabled": {
Expand All @@ -23,9 +20,40 @@
"minLength": 1
},
"metadataRequestURLConstructionScheme": {
"title": "label.md-request-url-construction-schema",
"description": "tooltip.md-request-url-construction-schema",
"type": "object",
"required": [
"@type",
"content"
],
"anyOf": [
{
"properties": {
"@type": {
"enum": [
"Regex"
]
}
},
"required": [
"@type",
"content",
"match"
]
},
{
"properties": {
"@type": {
"enum": [
"MetadataQueryProtocol"
]
}
},
"required": [
"@type",
"content"
]
}
],
"properties": {
"@type": {
"title": "label.md-request-type",
Expand All @@ -41,12 +69,6 @@
],
"description": "value.md-query-protocol"
},
{
"enum": [
"Template"
],
"description": "value.template"
},
{
"enum": [
"Regex"
Expand All @@ -56,71 +78,10 @@
]
},
"content": {
"title": "label.value",
"description": "tooltip.md-request-url-construction-scheme-value",
"title": "label.md-request-value",
"description": "tooltip.md-request-value",
"type": "string"
},
"transformRef": {
"title": "label.transform-ref",
"description": "tooltip.transform-ref",
"type": "string",
"visibleIf": {
"content": [
""
]
}
},
"encodingStyle": {
"title": "label.encoding-style",
"description": "tooltip.encoding-style",
"type": "string",
"widget": {
"id": "select"
},
"default": "FORM",
"oneOf": [
{
"enum": [
"NONE"
],
"description": "None"
},
{
"enum": [
"FORM"
],
"description": "Form"
},
{
"enum": [
"PATH"
],
"description": "Path"
},
{
"enum": [
"FRAGMENT"
],
"description": "Fragment"
}
],
"visibleIf": {
"@type": [
"Template"
]
}
},
"velocityEngine": {
"title": "label.velocity-engine",
"description": "tooltip.velocity-engine",
"type": "string",
"default": "shibboleth.VelocityEngine",
"visibleIf": {
"@type": [
"Template"
]
}
},
"match": {
"title": "label.match",
"description": "tooltip.match",
Expand Down Expand Up @@ -644,7 +605,6 @@
"title": "label.certificate-file",
"description": "tooltip.certificate-file",
"type": "string",
"widget": "textarea",
"default": ""
}
},
Expand Down

0 comments on commit 757217a

Please sign in to comment.