feat: show application ownership and scoped console management
This commit is contained in:
@@ -100,11 +100,11 @@ func newServer(addr string, ready Checker, consoleAuth consoleauth.Store, tasks
|
||||
|
||||
// WrapConsoleAuth 必须在所有 Register* 路由完成后调用,因为路由注册器需要
|
||||
// 直接访问底层 ServeMux;包装完成后,浏览器会话才会转换为内部 Bearer 请求。
|
||||
func WrapConsoleAuth(server *http.Server, consoleAuth consoleauth.Store) {
|
||||
func WrapConsoleAuth(server *http.Server, consoleAuth consoleauth.Store, scopes ...consoleauth.Scopes) {
|
||||
if server == nil || consoleAuth == nil {
|
||||
return
|
||||
}
|
||||
server.Handler = ConsoleSessionMiddleware(server.Handler, consoleAuth)
|
||||
server.Handler = ConsoleSessionMiddleware(server.Handler, consoleAuth, scopes...)
|
||||
}
|
||||
|
||||
// WrapMetrics must run after all Register* functions because those functions
|
||||
|
||||
Reference in New Issue
Block a user