Update integration_test.go

This commit is contained in:
Jan-Otto Kröpke 2024-02-23 10:42:53 +01:00 committed by GitHub
parent 97e1d1dd1d
commit a28f6bd8d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -217,6 +217,7 @@ func RunAuthorizationCodeFlow(t *testing.T, opServer *httptest.Server, clientID,
targetURL, targetURL,
[]string{"openid", "email", "profile", "offline_access"}, []string{"openid", "email", "profile", "offline_access"},
rp.WithPKCE(cookieHandler), rp.WithPKCE(cookieHandler),
rp.WithAuthStyle(oauth2.AuthStyleInHeader),
rp.WithVerifierOpts( rp.WithVerifierOpts(
rp.WithIssuedAtOffset(5*time.Second), rp.WithIssuedAtOffset(5*time.Second),
rp.WithSupportedSigningAlgorithms("RS256", "RS384", "RS512", "ES256", "ES384", "ES512"), rp.WithSupportedSigningAlgorithms("RS256", "RS384", "RS512", "ES256", "ES384", "ES512"),
@ -307,6 +308,7 @@ func RunAuthorizationCodeFlow(t *testing.T, opServer *httptest.Server, clientID,
}() }()
require.Less(t, capturedW.Code, 400, "token exchange response code") require.Less(t, capturedW.Code, 400, "token exchange response code")
// TODO: how to check the custom header was sent to the server? // TODO: how to check the custom header was sent to the server?
// TODO: how to check the Autorization header was sent to the server? (AuthStyleInHeader)
//nolint:bodyclose //nolint:bodyclose
resp = capturedW.Result() resp = capturedW.Result()