Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for requestFunc (0.11 sec)

  1. staging/src/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go

    	return f(ctx, token)
    }
    
    // RequestFunc is a function that implements the Request interface.
    type RequestFunc func(req *http.Request) (*Response, bool, error)
    
    // AuthenticateRequest implements authenticator.Request.
    func (f RequestFunc) AuthenticateRequest(req *http.Request) (*Response, bool, error) {
    	return f(req)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 12 00:55:47 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authentication/group/group_adder_test.go

    	response := &authenticator.Response{User: &user.DefaultInfo{Name: "user", Groups: append(capacity, "original")}}
    	orig := toJson(response)
    
    	adder := authenticator.Request(
    		NewGroupAdder(
    			authenticator.RequestFunc(func(req *http.Request) (*authenticator.Response, bool, error) {
    				return response, true, nil
    			}),
    			[]string{"added"},
    		),
    	)
    
    	r, _, _ := adder.AuthenticateRequest(nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 11 20:04:50 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/authentication/request/anonymous/anonymous.go

    )
    
    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{
    			User: &user.DefaultInfo{
    				Name:   anonymousUser,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 31 21:50:11 UTC 2018
    - 1.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/filters/metrics_test.go

    			done := make(chan struct{})
    			auth := WithAuthentication(
    				http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {
    					close(done)
    				}),
    				authenticator.RequestFunc(func(_ *http.Request) (*authenticator.Response, bool, error) {
    					return tt.response, tt.status, tt.err
    				}),
    				http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {
    					close(done)
    				}),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 20 13:35:55 UTC 2023
    - 8.7K bytes
    - Viewed (0)
Back to top