mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-19 17:07:10 +00:00
Drop rancher auth
This commit is contained in:
parent
33b6924291
commit
f4ef308923
@ -3,7 +3,6 @@ package cli
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
rancherauth "github.com/rancher/rancher/pkg/auth"
|
|
||||||
steveauth "github.com/rancher/steve/pkg/auth"
|
steveauth "github.com/rancher/steve/pkg/auth"
|
||||||
authcli "github.com/rancher/steve/pkg/auth/cli"
|
authcli "github.com/rancher/steve/pkg/auth/cli"
|
||||||
"github.com/rancher/steve/pkg/server"
|
"github.com/rancher/steve/pkg/server"
|
||||||
@ -47,19 +46,6 @@ func (c *Config) ToServer(ctx context.Context) (*server.Server, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if auth == nil {
|
|
||||||
authServer, err := rancherauth.NewServer(ctx, restConfig)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
auth = authServer.Authenticator
|
|
||||||
startHooks = append(startHooks, func(ctx context.Context, s *server.Server) error {
|
|
||||||
s.Next = authServer.Management.Wrap(s.Next)
|
|
||||||
return authServer.Start(ctx)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &server.Server{
|
return &server.Server{
|
||||||
|
Loading…
Reference in New Issue
Block a user