Skip to content

Commit 4a87f6e

Browse files
committed
Add comment to explain why padding is removed.
Change-Id: I0882e0c5d99310b179ace493b937669520626263
1 parent 0dd70a0 commit 4a87f6e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cab-token-generator/java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public AccessToken generateToken(CredentialAccessBoundary accessBoundary)
206206

207207
byte[] encryptedRestrictions = this.encryptRestrictions(rawRestrictions, sessionKey);
208208

209+
// `withoutPadding` is used to stay consistent with server-side CAB
209210
String tokenValue =
210211
intermediateToken + "." + Base64.getUrlEncoder().withoutPadding().encodeToString(encryptedRestrictions);
211212

0 commit comments

Comments
 (0)