mirror of
https://github.com/project-zot/zot.git
synced 2026-06-19 05:57:57 +08:00
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:
+5
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user