Skip to content

Commit 2439907

Browse files
Add HR Employees all operations
1 parent 7352d2d commit 2439907

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

samples/authX-pro/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"# 6) Define the APIs and their operations and policies\n",
6969
"\n",
7070
"# Policies\n",
71+
"pol_hr_all_operations_pro = utils.read_policy_xml('hr_all_operations_pro.xml', sample_name = sample_folder)\n",
7172
"pol_hr_get = utils.read_policy_xml('hr_get.xml', sample_name = sample_folder)\n",
7273
"pol_hr_post = utils.read_policy_xml('hr_post.xml', sample_name = sample_folder)\n",
7374
"\n",
@@ -82,7 +83,7 @@
8283
"hr_benefits_api_path = f'/{api_prefix}benefits'\n",
8384
"hr_benefits_get = GET_APIOperation('Gets employee benefits', pol_hr_get)\n",
8485
"hr_benefits_post = POST_APIOperation('Creates employee benefits', pol_hr_post)\n",
85-
"hr_benefits = API(f'{api_prefix}Benefits', 'Benefits Pro', hr_benefits_api_path, 'This is a Human Resources API for employee benefits',\n",
86+
"hr_benefits = API(f'{api_prefix}Benefits', 'Benefits Pro', hr_benefits_api_path, 'This is a Human Resources API for employee benefits', pol_hr_all_operations_pro,\n",
8687
" operations = [hr_benefits_get, hr_benefits_post], tags = tags, productNames = [hr_product_name], subscriptionRequired = False)\n",
8788
"\n",
8889
"# APIs Array\n",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--
2+
This policy authenticates the caller based on their JSON Web Token. It is not calling an Identity Provider as this is a mock policy.
3+
-->
4+
<policies>
5+
<inbound>
6+
<base />
7+
<!-- TODO: Enable this with a proper subscription key tied to the product, then add tests. -->
8+
<!-- The caller must be using an HR product to call this API.-->
9+
<!-- <set-variable name="products" value="hr" />
10+
<include-fragment fragment-id="Product-Match-Any" /> -->
11+
</inbound>
12+
<backend>
13+
<base />
14+
</backend>
15+
<outbound>
16+
<base />
17+
</outbound>
18+
<on-error>
19+
<base />
20+
</on-error>
21+
</policies>

0 commit comments

Comments
 (0)