Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Commit a0a6255

Browse files
committed
fix tests
1 parent 9725ce9 commit a0a6255

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/authz/oidc_test.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"context"
1919
"crypto/rand"
2020
"crypto/rsa"
21-
"encoding/base64"
2221
"encoding/json"
2322
"errors"
2423
"fmt"
@@ -1497,9 +1496,9 @@ func requireTokensInResponse(t *testing.T, resp *envoy.OkHttpResponse, cfg *oidc
14971496
wantIDToken, wantAccessToken string
14981497
)
14991498

1500-
wantIDToken = cfg.GetIdToken().GetPreamble() + " " + base64.URLEncoding.EncodeToString([]byte(idToken))
1499+
wantIDToken = encodeHeaderValue(cfg.GetIdToken().GetPreamble(), idToken)
15011500
if cfg.GetAccessToken() != nil {
1502-
wantAccessToken = cfg.GetAccessToken().GetPreamble() + " " + base64.URLEncoding.EncodeToString([]byte(accessToken))
1501+
wantAccessToken = encodeHeaderValue(cfg.GetAccessToken().GetPreamble(), accessToken)
15031502
}
15041503

15051504
for _, header := range resp.GetHeaders() {

0 commit comments

Comments
 (0)