2929import java .util .concurrent .Future ;
3030import java .util .concurrent .ThreadPoolExecutor ;
3131import java .util .concurrent .TimeUnit ;
32- import java .util .concurrent .atomic .AtomicBoolean ;
3332
3433import static org .privacyidea .PIConstants .ENDPOINT_AUTH ;
3534import static org .privacyidea .PIConstants .ENDPOINT_POLLTRANSACTION ;
@@ -147,6 +146,14 @@ public PIResponse validateCheckSerial(String serial, String otp, Map<String, Str
147146 return this .validateCheckSerial (serial , otp , null , headers );
148147 }
149148
149+ /**
150+ * @see PrivacyIDEA#validateCheckSerial(String, String, String, Map)
151+ */
152+ public PIResponse validateCheckSerial (String serial , String otp , String transactionId )
153+ {
154+ return this .validateCheckSerial (serial , otp , transactionId , Collections .emptyMap ());
155+ }
156+
150157 /**
151158 * Send a request to /validate/check with the serial rather than the username to identify the token.
152159 *
@@ -185,15 +192,14 @@ public PIResponse validateCheckWebAuthn(String user, String transactionId, Strin
185192 *
186193 * @param user username
187194 * @param transactionId transactionId
188- * @param webAuthnSignResponse the WebAuthnSignResponse as returned from the
195+ * @param webAuthnSignResponse the WebAuthnSignResponse as returned from the browser
189196 * @param origin server name that was used for
190197 * @param headers optional headers for the request
191198 * @return PIResponse or null if error
192199 */
193200 public PIResponse validateCheckWebAuthn (String user , String transactionId , String webAuthnSignResponse ,
194201 String origin , Map <String , String > headers )
195202 {
196-
197203 Map <String , String > params = new LinkedHashMap <>();
198204 // Standard validateCheck data
199205 params .put (USER , user );
@@ -213,12 +219,20 @@ public PIResponse validateCheckWebAuthn(String user, String transactionId, Strin
213219 return this .parser .parsePIResponse (response );
214220 }
215221
222+ /**
223+ * @see PrivacyIDEA#validateCheckU2F(String, String, String, Map)
224+ */
225+ public PIResponse validateCheckU2F (String user , String transactionId , String signResponse )
226+ {
227+ return this .validateCheckU2F (user , transactionId , signResponse , Collections .emptyMap ());
228+ }
229+
216230 /**
217231 * Sends a request to /validate/check with the data required to authenticate a U2F token.
218232 *
219233 * @param user username
220234 * @param transactionId transactionId
221- * @param u2fSignResponse the U2F Sign Response as returned from the
235+ * @param u2fSignResponse the U2F Sign Response as returned from the browser
222236 * @return PIResponse or null if error
223237 */
224238 public PIResponse validateCheckU2F (String user , String transactionId , String u2fSignResponse ,
@@ -549,7 +563,6 @@ public static class Builder
549563 private String serviceAccountPass = "" ;
550564 private String serviceAccountRealm = "" ;
551565 private String userAgent = "" ;
552- private List <Integer > pollingIntervals = Collections .singletonList (1 );
553566 private IPILogger logger = null ;
554567 private boolean disableLog = false ;
555568 private IPISimpleLogger simpleLogBridge = null ;
@@ -641,19 +654,6 @@ public Builder serviceRealm(String serviceAccountRealm)
641654 return this ;
642655 }
643656
644- /**
645- * Set the intervals at which the polling is done when using asyncPollTransaction.
646- * The last number will be repeated if the end of the list is reached.
647- *
648- * @param intervals list of integers that represent seconds
649- * @return Builder
650- */
651- public Builder pollingIntervals (List <Integer > intervals )
652- {
653- this .pollingIntervals = intervals ;
654- return this ;
655- }
656-
657657 /**
658658 * Disable logging completely regardless of any set loggers.
659659 *
@@ -673,9 +673,8 @@ public PrivacyIDEA build()
673673 configuration .serviceAccountName = serviceAccountName ;
674674 configuration .serviceAccountPass = serviceAccountPass ;
675675 configuration .serviceAccountRealm = serviceAccountRealm ;
676- configuration .pollingIntervals = pollingIntervals ;
677676 configuration .disableLog = disableLog ;
678677 return new PrivacyIDEA (configuration , logger , simpleLogBridge );
679678 }
680679 }
681- }
680+ }
0 commit comments