Refactor authenticator
Signed-off-by: hongming <hongming@kubesphere.io>
This commit is contained in:
@@ -21,6 +21,8 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
"kubesphere.io/kubesphere/pkg/apiserver/authentication/token"
|
||||
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
cliflag "k8s.io/component-base/cli/flag"
|
||||
"k8s.io/klog"
|
||||
@@ -238,6 +240,11 @@ func (s *ServerRunOptions) NewAPIServer(stopCh <-chan struct{}) (*apiserver.APIS
|
||||
klog.Fatalf("unable to create controller runtime client: %v", err)
|
||||
}
|
||||
|
||||
apiServer.Issuer, err = token.NewIssuer(s.AuthenticationOptions)
|
||||
if err != nil {
|
||||
klog.Fatalf("unable to create issuer: %v", err)
|
||||
}
|
||||
|
||||
apiServer.Server = server
|
||||
|
||||
return apiServer, nil
|
||||
|
||||
Reference in New Issue
Block a user