Skip to content

Commit 92643fc

Browse files
Update PrivacyIDEA.java
1 parent ffea1a3 commit 92643fc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/main/java/org/privacyidea/PrivacyIDEA.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import static org.privacyidea.PIConstants.ENDPOINT_TOKEN_INIT;
4242
import static org.privacyidea.PIConstants.ENDPOINT_TRIGGERCHALLENGE;
4343
import static org.privacyidea.PIConstants.ENDPOINT_VALIDATE_CHECK;
44+
import static org.privacyidea.PIConstants.CANCEL_ENROLLMENT;
4445
import static org.privacyidea.PIConstants.ENDPOINT_VALIDATE_INITIALIZE;
4546
import static org.privacyidea.PIConstants.GENKEY;
4647
import static org.privacyidea.PIConstants.GET;
@@ -373,6 +374,32 @@ public ChallengeStatus pollTransaction(String transactionID)
373374
return piresponse.challengeStatus;
374375
}
375376

377+
/**
378+
* @see PrivacyIDEA#validateCheckCancelEnrollment(String, Map)
379+
*/
380+
public PIResponse validateCheckCancelEnrollment(String transactionID)
381+
{
382+
return this.validateCheckCancelEnrollment(transactionID, Collections.emptyMap());
383+
}
384+
385+
/**
386+
* Cancel enrollment via multichallenge.
387+
*
388+
* @param transactionID transaction ID
389+
* @param headers optional headers for the request
390+
* @return PIResponse or null if error
391+
*/
392+
public PIResponse validateCheckCancelEnrollment(String transactionID, Map<String, String> headers)
393+
{
394+
Map<String, String> params = new LinkedHashMap<>();
395+
params.put(TRANSACTION_ID, transactionID);
396+
params.put(CANCEL_ENROLLMENT, "true");
397+
appendRealm(params);
398+
399+
String response = runRequestAsync(ENDPOINT_VALIDATE_CHECK, params, headers, false, POST);
400+
return this.parser.parsePIResponse(response);
401+
}
402+
376403
/**
377404
* Get the service account parameters.
378405
*

0 commit comments

Comments
 (0)