We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

POST call inside testConnectionParams

yogendragautam
New Contributor II
New Contributor II

Is it possible to put a post call inside testConnectionParams ?

I am using the below json.

{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "https://gtqaapi.multibankportal.com/auth/oauth/token ",
"httpMethod": "POST",
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic ***********"
},
"httpParams": {
"username": "*********",
"password": "*******",
"grant_type": "password"
},
"properties": {
"userName": "*******",
"password": "***************"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "Authentication failed",
"authError": [
"HTTP ERROR",
"USER_AUTHENTICATION_FAILED",
"PARTNER_AUTHENTICATION_FAILED",
"Authentication Failed",
"Authentication failed.",
"InvalidAuthenticationToken",
"AuthenticationFailed",
"invalid_client",
"Authentication_MissingOrMalformed",
"Authentication_ExpiredToken",
"HTTP ERROR: 401",
"401 Unauthorized",
"401",
"403",
"400"
],
"timeOutError": "Read timed out",
"errorPath": "errors.message",
"maxRefreshTryCount": 6,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "testrandomvalue",
"retryFailureStatusCode": [
401,
400,
403,
500
],
"testConnectionParams": {
"http": {
"httpMethod": "POST",
"url": "https://gtqaapi.multibankportal.com/auth/oauth/token ",
"httpHeaders": {
"Authorization": "Basic *********************************",
"Content-Type": "application/x-www-form-urlencoded"
},
"httpParams": {
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"assertion": "${access_token}",
"company_id": "C03763"
},
"properties": {
"userName": "delient",
"password": "*********************"
},
"httpContentType": "application/x-www-form-urlencoded"
},
"successResponses": {
"statusCode": [
200,
201,
200,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
403,
401,
404,
409,
501,
500
]
},
"errors": [
"Couldn't authenticate you"
],
"errorPath": "error"
}
}
}
}

 

 

This gives the below error.

 

2024-01-14/17:11:55.301 [{}] [https-jsse-nio-443-exec-155] ERROR rest.RestProvisioningService - Error while saving the Connection: groovy.lang.MissingMethodException: No signature of method: com.saviynt.provisoning.rest.RestUtilService.getDynamicBindString() is applicable for argument types: (java.util.LinkedHashMap, java.util.HashMap) values: [[grant_type:urn:ietf:params:oauth:grant-type:jwt-bearer, ...], ...]
Possible solutions: getDynamicBindString(java.lang.String, java.util.Map)
2024-01-14/17:11:55.302 [{}] [https-jsse-nio-443-exec-155] DEBUG println.PrintlnToLogger - Println :: | Error groovy.lang.MissingMethodException: No signature of method: com.saviynt.provisoning.rest.RestUtilService.getDynamicBindString() is applicable for argument types: (java.util.LinkedHashMap, java.util.HashMap) values: [[grant_type:urn:ietf:params:oauth:grant-type:jwt-bearer, ...], ...]

[This message has been edited by moderator to mask sensitive info]

8 REPLIES 8

yogendragautam
New Contributor II
New Contributor II

Any suggestions on mitigating this error ?

rushikeshvartak
All-Star
All-Star

Please share curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]

 

Hide confidential Information


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

yogendragautam
New Contributor II
New Contributor II

Hi Rushikesh,

 

Please find the CURL command below.

 

--header 'Connection: keep-alive' \
--header 'Accept: */*' \
--header 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
--header 'Authorization: Basic ***************
--header 'Cookie: JSESSIONID=******************************' \
--data-urlencode 'grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer' \
--data-urlencode 'assertion=eyJraWQiOiJlN2M2M2UyNy0zMTNiLTQ5Y2ItYjRiZS00MjI3MWQ1YTAzZmMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJtZXJ2aW4uci1leHRAYWxzdG9tZ3JvdXAuY29tIiwiYXVkIjpbImF1dGgiLCJsZWdhY3kiXSwibmJmIjoxNzA1MjUxOTI0LCJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6ODY4NiIsImV4cCI6MTcwNTMzODMyNCwiaWF0IjoxNzA1MjUxOTI0LCJjbGllbnRfaWQiOiJkZWZhdWx0X2NsaWVudCIsImF1dGhvcml0aWVzIjpbIlZJRVdfQ09NUEFOWSJdLCJ1c2VybmFtZSI6Im1lcnZpbi5yLWV4dEBhbHN0b21ncm91cC5jb20ifQ.OgLeotjLa0vP6g44RlToJCdzkotNhFSLORD3bhZSJfsezJPXt8r4nIgx552VbE3G01XuMco-u--cLgf8YLwmVDlu0nmIzxRd6uZzGA26r-ZyDl-DeiacWmJ8Gew4kKfquBjOTe-uwqCcHn3DwgG_o_bRJXt5KYtwbrOM5BXzTjvWg3b37nJU06x1lVgrTH7X2i7P9Y5G6vw7U1M1mjdvDbYJoOO7pYMyUy2wnCjF-HgWkr7C_MF_RDm-SIkXkHwzVr-65LMEBG-3V4bcYjuulhTDHyX5acqQDjpjc2gXqhduq6xN5QSb2E5gSPau09u8u0-yymkrJL3Jz6NGGLdsiQ' \
--data-urlencode 'company_id=COM003763'
 
[This message has been edited by moderator mask sensitive info]

Any specific reason why you want to make post call in test connection param


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

yogendragautam
New Contributor II
New Contributor II

Hi,

 

I wanted to validate if my connection json is generating the access token or not.

I have to use the access token generated in the first call as an input parameter in the assertion attribute of the second call.

My connection json will have 2 calls, first one to generate access token, second one to generate another access token the second access token is used in createaccount, update account etc..

the second call is also a post call to generate a larger access token. So I want to check if my first api call is generating an access token or not.

I wanted to see if the below json is generating an access token or not.

 

{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "https://gtqaapi.multibankportal.com/auth/oauth/token",
"httpMethod": "POST",
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded"
},
"httpParams": {
"client_id": "defauent",
"client_secret": "spring-securitynt-password1234",
"username": "************",
"password": "******",
"grant_type": "password"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "Authentication failed",
"authError": [
"HTTP ERROR",
"USER_AUTHENTICATION_FAILED",
"PARTNER_AUTHENTICATION_FAILED",
"Authentication Failed",
"Authentication failed.",
"InvalidAuthenticationToken",
"AuthenticationFailed",
"invalid_client",
"Authentication_MissingOrMalformed",
"Authentication_ExpiredToken",
"HTTP ERROR: 401",
"401 Unauthorized",
"401",
"403",
"400"
],
"timeOutError": "Read timed out",
"errorPath": "errors.message",
"maxRefreshTryCount": 6,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abc",
"retryFailureStatusCode": [
401,
400,
403,
500
]
}
}
}

Add success response code


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.