Address code review feedback

- Use NewBearerAuthorizer constructor instead of manual initialization
- Remove unused CreateOAuth2Config helper function
- Remove unnecessary sleep calls from tests (faster and more reliable)
- Remove unused oauth2 import

Co-authored-by: rchincha <45800463+rchincha@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-14 21:22:50 +00:00
parent 2a064f0fe5
commit 802c2be924
3 changed files with 5 additions and 41 deletions
+5 -5
View File
@@ -498,11 +498,11 @@ func bearerAuthHandler(ctlr *Controller) mux.MiddlewareFunc {
ctlr.Log.Panic().Err(err).Msg("failed to load public key for bearer authentication")
}
traditionalAuthorizer = &BearerAuthorizer{
realm: authConfig.Bearer.Realm,
service: authConfig.Bearer.Service,
key: publicKey,
}
traditionalAuthorizer = NewBearerAuthorizer(
authConfig.Bearer.Realm,
authConfig.Bearer.Service,
publicKey,
)
}
// OIDC bearer auth for workload identity