Skip to content

Commit

Permalink
chore: add example for whitelistClientCertificates in schema-form
Browse files Browse the repository at this point in the history
  • Loading branch information
gcusnieux authored and gaetanmaisse committed Mar 23, 2023
1 parent bf1bcdf commit 16188b4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('S C H E M A F O R M G R O U P', () => {
'readonly',
'writeonly',
'whitelist',
'whitelistClientCertificates',
];

const checkControl = (id, attributes = []) => {
Expand Down Expand Up @@ -100,6 +101,7 @@ describe('S C H E M A F O R M G R O U P', () => {
checkControl('select');
checkControl('multiselect');
checkControl('whitelist');
checkControl('whitelistClientCertificates');
});

test('should create element with valid value', async () => {
Expand Down
2 changes: 2 additions & 0 deletions src/organisms/gv-schema-form/gv-schema-form.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('S C H E M A F O R M', () => {
'readonly',
'writeonly',
'whitelist',
'whitelistClientCertificates',
];

const checkControl = (id, attributes = []) => {
Expand Down Expand Up @@ -100,6 +101,7 @@ describe('S C H E M A F O R M', () => {
checkControl('select');
checkControl('multiselect');
checkControl('whitelist');
checkControl('whitelistClientCertificates');
});

test('should create element with valid values', async () => {
Expand Down
10 changes: 10 additions & 0 deletions testing/resources/schemas/mixed.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@
},
"required": ["pattern"]
}
},
"whitelistClientCertificates": {
"title": "Allowed client certificates (requires client authentication)",
"type": "array",
"items": {
"type": "string",
"pattern": "^(?: *[A-Z]+ *= *(?:\\w|\\*|\\?| )+,?)*$",
"description": "Name of client (X.500 principal). Can be expressed with an Ant pattern. For example: CN=localhost,O=GraviteeSource*,C=??",
"title": "Distinguish Name"
}
}
},
"required": ["multiselect", "timeToLiveSeconds"],
Expand Down

0 comments on commit 16188b4

Please sign in to comment.