@boxyhq/saml-jackson 0.1.5-beta.138 → 0.1.5-beta.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -166,12 +166,12 @@ curl --location --request POST 'http://localhost:6000/api/v1/saml/config' \
166
166
 
167
167
  The response returns a JSON with `client_id` and `client_secret` that can be stored against your tenant and product for a more secure OAuth 2.0 flow. If you do not want to store the `client_id` and `client_secret` you can alternatively use `client_id=tenant=<tenantID>&product=<productID>` and any arbitrary value for `client_secret` when setting up the OAuth 2.0 flow. Additionally a `provider` attribute is also returned which indicates the domain of your Identity Provider.
168
168
 
169
- #### 2.1 SAML GET config API
169
+ #### 2.1 SAML get config API
170
170
 
171
- This endpoint can be used to return metadata about an existing SAML config. This can be used to check and display the details to your customers. You can use either `clientID` and `clientSecret` combination or `tenant` and `product` combination.
171
+ This endpoint can be used to return metadata about an existing SAML config. This can be used to check and display the details to your customers. You can use either `clientID` or `tenant` and `product` combination.
172
172
 
173
173
  ```
174
- curl --location --request GET 'http://localhost:6000/api/v1/saml/config' \
174
+ curl --location --request POST 'http://localhost:6000/api/v1/saml/config/get' \
175
175
  --header 'Authorization: Api-Key <Jackson API Key>' \
176
176
  --header 'Content-Type: application/x-www-form-urlencoded' \
177
177
  --data-urlencode 'tenant=boxyhq.com' \
@@ -179,11 +179,10 @@ curl --location --request GET 'http://localhost:6000/api/v1/saml/config' \
179
179
  ```
180
180
 
181
181
  ```
182
- curl --location --request GET 'http://localhost:6000/api/v1/saml/config' \
182
+ curl --location --request POST 'http://localhost:6000/api/v1/saml/config/get' \
183
183
  --header 'Authorization: Api-Key <Jackson API Key>' \
184
184
  --header 'Content-Type: application/x-www-form-urlencoded' \
185
- --data-urlencode 'clientID=<Client ID>' \
186
- --data-urlencode 'clientSecret=<Client Secret>'
185
+ --data-urlencode 'clientID=<Client ID>'
187
186
  ```
188
187
 
189
188
  The response returns a JSON with `provider` indicating the domain of your Identity Provider. If an empty JSON payload is returned then we do not have any configuration stored for the attributes you requested.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boxyhq/saml-jackson",
3
- "version": "0.1.5-beta.138",
3
+ "version": "0.1.5-beta.139",
4
4
  "license": "Apache 2.0",
5
5
  "description": "SAML 2.0 service",
6
6
  "main": "src/index.js",
@@ -83,9 +83,9 @@ const config = async (body) => {
83
83
  };
84
84
 
85
85
  const getConfig = async (body) => {
86
- const { clientID, clientSecret, tenant, product } = body;
86
+ const { clientID, tenant, product } = body;
87
87
 
88
- if (clientID && clientSecret) {
88
+ if (clientID) {
89
89
  const samlConfig = await configStore.get(clientID);
90
90
  if (!samlConfig) {
91
91
  return {};
package/src/jackson.js CHANGED
@@ -87,7 +87,7 @@ internalApp.post(apiPath + '/config', async (req, res) => {
87
87
  }
88
88
  });
89
89
 
90
- internalApp.get(apiPath + '/config', async (req, res) => {
90
+ internalApp.post(apiPath + '/config/get', async (req, res) => {
91
91
  try {
92
92
  const apiKey = extractAuthToken(req);
93
93
  if (!validateApiKey(apiKey)) {