Skip to content

Commit 7a835e5

Browse files
path2 e2e: print full JWT claims and raw token
Add appid, app_displayname, idtyp, appidacr, aud, xms_tbflags claims to summary output. Print raw JWT after summary for verification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2857d2a commit 7a835e5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

msal4j-mtls-extensions/src/e2e/java/com/microsoft/aad/msal4j/mtls/e2e/Path2ManagedIdentity.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,17 +191,25 @@ private static void printTokenSummary(String jwt) {
191191
String header = new String(Base64.getUrlDecoder().decode(pad(parts[0])));
192192
String payload = new String(Base64.getUrlDecoder().decode(pad(parts[1])));
193193
System.out.println(" AccessToken header: " + header);
194-
// Print only key claims to keep output readable.
194+
// Key claims
195195
printClaim(payload, "oid");
196196
printClaim(payload, "tid");
197+
printClaim(payload, "appid");
198+
printClaim(payload, "app_displayname");
199+
printClaim(payload, "idtyp");
200+
printClaim(payload, "appidacr");
201+
printClaim(payload, "aud");
197202
printClaim(payload, "token_type");
203+
printClaim(payload, "xms_tbflags");
198204
printClaim(payload, "cnf");
199205
long expEpoch = extractLong(payload, "exp");
200206
if (expEpoch > 0) {
201207
System.out.println(" AccessToken exp: "
202208
+ new java.util.Date(expEpoch * 1000));
203209
}
204210
System.out.println(" ✅ AccessToken present (" + jwt.length() + " chars)");
211+
System.out.println(" Raw JWT:");
212+
System.out.println(" " + jwt);
205213
} catch (Exception e) {
206214
System.out.println(" AccessToken: (could not decode JWT: " + e.getMessage() + ")");
207215
}

0 commit comments

Comments
 (0)