Skip to content

Commit

Permalink
Update PrivacyIDEA.java
Browse files Browse the repository at this point in the history
fix params map in pi request
  • Loading branch information
lukasmatusiewicz committed Nov 25, 2024
1 parent 1394474 commit 9f25018
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/java/org/privacyidea/PrivacyIDEA.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,9 @@ public boolean pollTransaction(String transactionID)
{
Objects.requireNonNull(transactionID, "TransactionID is required!");

String
response =
runRequestAsync(ENDPOINT_POLLTRANSACTION, Collections.singletonMap(TRANSACTION_ID, transactionID), Collections.emptyMap(),
false, GET);
Map<String, String> params = new LinkedHashMap<>();
params.put(TRANSACTION_ID, transactionID);
String response = runRequestAsync(ENDPOINT_POLLTRANSACTION, params, Collections.emptyMap(), false, GET);
PIResponse piresponse = this.parser.parsePIResponse(response);
return piresponse.value;
}
Expand Down Expand Up @@ -290,8 +289,9 @@ public List<TokenInfo> getTokenInfo(String username)
error("Cannot retrieve token info without service account!");
return null;
}

String response = runRequestAsync(ENDPOINT_TOKEN, Collections.singletonMap(USER, username), new LinkedHashMap<>(), true, GET);
Map<String, String> params = new LinkedHashMap<>();
params.put(USER, username);
String response = runRequestAsync(ENDPOINT_TOKEN, params, new LinkedHashMap<>(), true, GET);
return parser.parseTokenInfoList(response);
}

Expand Down Expand Up @@ -372,7 +372,7 @@ private String runRequestAsync(String path, Map<String, String> params, Map<Stri
{
if (!configuration.forwardClientIP.isEmpty())
{
params.put(CLIENT_IP,configuration.forwardClientIP);
params.put(CLIENT_IP, configuration.forwardClientIP);
}
Callable<String> callable = new AsyncRequestCallable(this, endpoint, path, params, headers, authTokenRequired, method);
Future<String> future = threadPool.submit(callable);
Expand Down

0 comments on commit 9f25018

Please sign in to comment.