Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewAuthenticator (0.22 sec)

  1. staging/src/k8s.io/apiserver/pkg/authentication/authenticatorfactory/delegating.go

    		if c.Anonymous {
    			return anonymous.NewAuthenticator(), &securityDefinitions, nil
    		}
    		return nil, nil, errors.New("No authentication method configured")
    	}
    
    	authenticator := group.NewAuthenticatedGroupAdder(unionauth.New(authenticators...))
    	if c.Anonymous {
    		authenticator = unionauth.NewFailOnError(authenticator, anonymous.NewAuthenticator())
    	}
    	return authenticator, &securityDefinitions, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 29 07:49:14 UTC 2021
    - 5.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authentication/request/anonymous/anonymous.go

    	"k8s.io/apiserver/pkg/authentication/authenticator"
    	"k8s.io/apiserver/pkg/authentication/user"
    )
    
    const (
    	anonymousUser = user.Anonymous
    
    	unauthenticatedGroup = user.AllUnauthenticated
    )
    
    func NewAuthenticator() authenticator.Request {
    	return authenticator.RequestFunc(func(req *http.Request) (*authenticator.Response, bool, error) {
    		auds, _ := authenticator.AudiencesFrom(req.Context())
    		return &authenticator.Response{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 31 21:50:11 UTC 2018
    - 1.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/authentication/request/anonymous/anonymous_test.go

    	"k8s.io/apimachinery/pkg/util/sets"
    	"k8s.io/apiserver/pkg/authentication/authenticator"
    	"k8s.io/apiserver/pkg/authentication/user"
    )
    
    func TestAnonymous(t *testing.T) {
    	var a authenticator.Request = NewAuthenticator()
    	r, ok, err := a.AuthenticateRequest(&http.Request{})
    	if err != nil {
    		t.Fatalf("Unexpected error %v", err)
    	}
    	if !ok {
    		t.Fatalf("Unexpectedly unauthenticated")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 26 22:33:54 UTC 2018
    - 1.3K bytes
    - Viewed (0)
  4. pkg/kubeapiserver/authenticator/config.go

    				In:          "header",
    				Description: "Bearer Token authentication",
    			},
    		}
    	}
    
    	if len(authenticators) == 0 {
    		if config.Anonymous {
    			return anonymous.NewAuthenticator(), nil, &securityDefinitionsV2, securitySchemesV3, nil
    		}
    		return nil, nil, &securityDefinitionsV2, securitySchemesV3, nil
    	}
    
    	authenticator := union.New(authenticators...)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 19:29:33 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/filters/authentication_test.go

    			case "known":
    				return &authenticator.Response{User: &user.DefaultInfo{Name: "panda"}}, true, nil
    			case "error":
    				return nil, false, errors.New("authn err")
    			case "anonymous":
    				return anonymous.NewAuthenticator().AuthenticateRequest(r)
    			case "anonymous_group":
    				return &authenticator.Response{User: &user.DefaultInfo{Groups: []string{user.AllUnauthenticated}}}, true, nil
    			default:
    				return nil, false, nil
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 20.5K bytes
    - Viewed (0)
Back to top