Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 7b4d8e2

Browse files
author
Chris Wiechmann
committed
Added example headers/method/body to the external AuthZ.
1 parent 3433be8 commit 7b4d8e2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

apibuilder4elastic/custom_flow_nodes/api-builder-plugin-authorization/test/testConfig/authorization-config-extAuthZCustom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var authorizationConfig = {
22
// For how long should the information cached by the API-Builder process
33
cacheTTL: parseInt(process.env.EXT_AUTHZ_CACHE_TTL) ? process.env.EXT_AUTHZ_CACHE_TTL : 300,
4-
'externalHTTP' : {
4+
externalHTTP : {
55
// e.g.: https://authz.ac.customer.com/api/v1/users/${loginName}/groups?registry=AD&caching=false&filter=apg-t
66
uri: process.env.EXT_AUTHZ_URI,
77
// e.g.: customProperty1.apimId

config/authorization-config-sample.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ var authorizationConfig = {
4646
// custom (text-field) --> { "match": { "customProperties.field1": "DGP UIF CSPARTINT CORSOEDMS CORSOLMS TCL" } }
4747
// select/switch --> { "terms": { "customProperties.field1": [ "DGP", "UIF", "CSPARTINT", "CORSOEDMS", "CORSOLMS", "TCL" ] } }
4848
restrictionFieldType: "select",
49+
50+
// If you would like to add some headers to the request you can do configure it here
51+
// headers: { requiredHeader: "HeaderValue"},
52+
// By default GET is used, but you can overwrite the method if you need
53+
// method: "POST",
54+
// Adjust the payload
55+
//body: { JSON: "Payload is supported as of now" },
4956
}
5057
}
5158

0 commit comments

Comments
 (0)