Skip to content

Commit 1fa05ee

Browse files
authored
Add Audience to authserver test client fixture (#4814)
Fosite validates that a granted audience appears in the client's own `GetAudience()` list when handling refresh tokens. The main `setupTestServer` helper registered the test client without an `Audience` field, so the check failed with HTTP 400 after the token handler began defaulting to the sole `AllowedAudience` on the initial `authorization_code` exchange. DCR registration always sets `Audience` to `AllowedAudiences`; align the test fixture with that production behaviour.
1 parent 25fe475 commit 1fa05ee

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pkg/authserver/integration_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ func setupTestServer(t *testing.T, opts ...testServerOption) *testServer {
139139
ResponseTypes: []string{"code"},
140140
GrantTypes: []string{"authorization_code", "refresh_token"},
141141
Scopes: options.scopes,
142+
Audience: []string{testAudience},
142143
Public: true,
143144
})
144145
require.NoError(t, err)

0 commit comments

Comments
 (0)