Refactor authenticator
Signed-off-by: hongming <hongming@kubesphere.io>
This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/controller"
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
|
||||
authoptions "kubesphere.io/kubesphere/pkg/apiserver/authentication/options"
|
||||
"kubesphere.io/kubesphere/pkg/apiserver/authentication"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/validation"
|
||||
|
||||
@@ -78,7 +78,7 @@ type Reconciler struct {
|
||||
MultiClusterEnabled bool
|
||||
DevopsClient devops.Interface
|
||||
LdapClient ldapclient.Interface
|
||||
AuthenticationOptions *authoptions.AuthenticationOptions
|
||||
AuthenticationOptions *authentication.Options
|
||||
Logger logr.Logger
|
||||
Scheme *runtime.Scheme
|
||||
Recorder record.EventRecorder
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
|
||||
"kubesphere.io/kubesphere/pkg/apiserver/authentication/options"
|
||||
"kubesphere.io/kubesphere/pkg/apiserver/authentication"
|
||||
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
@@ -60,7 +60,7 @@ func newUser(name string) *iamv1alpha2.User {
|
||||
}
|
||||
|
||||
func TestDoNothing(t *testing.T) {
|
||||
authenticateOptions := options.NewAuthenticateOptions()
|
||||
authenticateOptions := authentication.NewOptions()
|
||||
authenticateOptions.AuthenticateRateLimiterMaxTries = 1
|
||||
authenticateOptions.AuthenticateRateLimiterDuration = 2 * time.Second
|
||||
user := newUser("test")
|
||||
|
||||
Reference in New Issue
Block a user