Skip to content

Commit 4978459

Browse files
committed
Merge branch 'cimd-phase2-pr2-storage-decorator' into cimd-phase2-pr3-wiring
2 parents 6e864d9 + 9ff0c4c commit 4978459

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

pkg/authserver/server_impl.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ func newServer(ctx context.Context, cfg Config, stor storage.Storage, opts ...se
107107
// provably safe for the production backends; surfacing a bad backend as
108108
// a constructor error keeps misconfiguration fail-loud at boot rather
109109
// than at first DCR resolve.
110-
//
111110
baseStore := unwrapStorage(stor)
112111
dcrStore, ok := baseStore.(storage.DCRCredentialStore)
113112
if !ok {

pkg/authserver/storage/cimd_decorator_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ func TestBuildFositeClient_LoopbackRedirectWrapsInLoopbackClient(t *testing.T) {
383383
}
384384
_, ok := got.(loopbackMatcher)
385385
assert.True(t, ok, "loopback redirect URI must produce a LoopbackClient")
386+
387+
// TokenEndpointAuthMethod must be preserved through the LoopbackClient wrapper.
388+
oidc, ok := got.(fosite.OpenIDConnectClient)
389+
require.True(t, ok, "LoopbackClient must implement fosite.OpenIDConnectClient")
390+
assert.Equal(t, "none", oidc.GetTokenEndpointAuthMethod(),
391+
"loopback client must preserve TokenEndpointAuthMethod from the OIDC client")
386392
}
387393

388394
func TestBuildFositeClient_NonLoopbackRedirectReturnsOpenIDConnectClient(t *testing.T) {

0 commit comments

Comments
 (0)