0

I am trying to use centrify APIs

Following curl commands work properly

curl -H "X-CENTRIFY-NATIVE-CLIENT:1" -H "Content-type: application/json" -d     "{User: '*****,Version: '1.0', TenantId: ''  }"     'https://****.cellwe.samsungknox.com/Security/StartAuthentication' --dump-header     headers.txt

curl -H "X-CENTRIFY-NATIVE-CLIENT:1" -H "Content-type: application/json" -d "{TenantId: '***', SessionId: 'qyrOp_Dvg-btRLQRtjzS2n1AeE2s3tpDh1V68A3TM8Y1', MechanismId: 'tKrhMSCSkUCGzPj2C1aTg1fFrWc75XY-BOhuu63qa9k1',Action: 'Answer', Answer: '****'}"  'https://****.cellwe.samsungknox.com/security/AdvanceAuthentication' --dump-header headers.txt

curl -H "X-CENTRIFY-NATIVE-CLIENT:1" -H "Content-type: application/json" -d "{UUID:'*****'}"  -b headers.txt 'https://****.cellwe.samsungknox.com/UserMgmt/GetUserInfo'

I am not able to write the equivalent java code, because, some cookies are not transferred through request.

Please refer the following API guide as well as sample program in .net

API guide http://developer.centrify.com/site/global/documentation/api_guide/using_the_api/index.gsp

Sample Program http://community.centrify.com/t5/TechBlog/Customized-Integration-of-Centrify-User-Suite-All-About-REST/ba-p/18769

Jay
  • 1,089
  • 12
  • 29
Aniruddha
  • 51
  • 5
  • You can add cookies using [CookieHandler.getDefault()](http://docs.oracle.com/javase/8/docs/api/java/net/CookieHandler.html#getDefault--), before connecting to the URL. – VGR Dec 01 '16 at 18:16
  • What about using `Apache HTTP Client` with same parameters –  Dec 02 '16 at 16:06
  • note also you do not have to send the auth token you get back as a cookie, you can send it as an oauth bearer token (in a header) – pm100 Dec 02 '16 at 16:53

0 Answers0