mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Make authorization plugins use pluginv2.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/docker/pkg/plugingetter"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
@@ -15,7 +16,8 @@ type Middleware struct {
|
||||
|
||||
// NewMiddleware creates a new Middleware
|
||||
// with a slice of plugins names.
|
||||
func NewMiddleware(names []string) *Middleware {
|
||||
func NewMiddleware(names []string, pg plugingetter.PluginGetter) *Middleware {
|
||||
SetPluginGetter(pg)
|
||||
return &Middleware{
|
||||
plugins: newPlugins(names),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user