Skip to content

Commit 7c90d14

Browse files
committed
add enrollment link
1 parent 09c1ffc commit 7c90d14

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/main/java/org/privacyidea/JSONParser.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,18 +223,18 @@ else if ("interactive".equals(modeFromResponse))
223223
String message = getString(challenge, MESSAGE);
224224
String clientMode = getString(challenge, CLIENT_MODE);
225225
String image = getString(challenge, IMAGE);
226+
226227
String transactionID = getString(challenge, TRANSACTION_ID);
227228
String type = getString(challenge, TYPE);
228229

229230
if (challenge.has(PASSKEY_REGISTRATION))
230231
{
231232
response.passkeyRegistration = challenge.get(PASSKEY_REGISTRATION).toString();
232-
// TODO for passkey registration with enroll_via_multichallenge, the txid is probably in the wrong place
233-
// as of 3.11.0
234-
if (response.transactionID == null || response.transactionID.isEmpty())
235-
{
236-
response.transactionID = transactionID;
237-
}
233+
}
234+
String link = getString(challenge, LINK);
235+
if (response.enrollmentLink == null || response.enrollmentLink.isEmpty())
236+
{
237+
response.enrollmentLink = link;
238238
}
239239

240240
if (TOKEN_TYPE_WEBAUTHN.equals(type))

src/main/java/org/privacyidea/PIConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public class PIConstants
7373
public static final String ATTRIBUTES = "attributes";
7474
public static final String DETAIL = "detail";
7575
public static final String OTPLEN = "otplen";
76+
public static final String LINK = "link";
7677
public static final String CODE = "code";
7778
public static final String ERROR = "error";
7879
public static final String STATUS = "status";

src/main/java/org/privacyidea/PIResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public class PIResponse
5454
public String passkeyChallenge = "";
5555
public String passkeyRegistration = "";
5656
public String username = "";
57+
public String enrollmentLink = "";
58+
5759

5860
public boolean authenticationSuccessful()
5961
{

0 commit comments

Comments
 (0)