06-20-2023 09:59 PM
I have a Java 8 Maven project that’s using the duo_client_java v0.6.0 and I’m trying to call my own version of the getUsersWithPaging example.
My code is:
Admin request = new
Admin.AdminBuilder(“GET”, “XXXXX.duosecurity.com”, “/admin/v1/users”).build();
request.signRequest(“myIKey”, “mySKey”);
result = (JSONObject) request.executeJSONRequest();
All I’ve done is add my iKey, sKey, and URL and it keeps returning:
java.lang.Exception: Duo error code (40103): Invalid signature in request credentials
Ironically, I’m able to successfully call the endpoint using the same credentials in Postman.
I can see the Basic authorization being generated in the Java client for the request is significantly more characters than the one being generated in Postman. 84 vs. 200 for the same request parameters/body.
Any ideas?
06-21-2023 07:49 AM
I should mention the getUsersWithPaging method is in the example DuoAdmin.java here:
08-08-2023 09:12 AM
I think the reason is internally duo-client-java is using SHA-512 as hashing algorithm whereas in the documentation it is mentioned to use SHA-1. Can anyone please provide the solution for this?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide