Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TokenFunc (0.29 sec)

  1. staging/src/k8s.io/apiserver/pkg/authentication/request/websocket/protocol_test.go

    	"testing"
    
    	"k8s.io/apiserver/pkg/authentication/authenticator"
    	"k8s.io/apiserver/pkg/authentication/user"
    )
    
    func TestAuthenticateRequest(t *testing.T) {
    	auth := NewProtocolAuthenticator(authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) {
    		if token != "token" {
    			t.Errorf("unexpected token: %s", token)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 08 21:43:39 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go

    )
    
    func TestCachedTokenAuthenticator(t *testing.T) {
    	var (
    		calledWithToken []string
    
    		resultUsers map[string]user.Info
    		resultOk    bool
    		resultErr   error
    	)
    	fakeAuth := authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) {
    		calledWithToken = append(calledWithToken, token)
    		return &authenticator.Response{User: resultUsers[token]}, resultOk, resultErr
    	})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  3. pkg/kubeapiserver/authenticator/config.go

    			config:              config,
    			jwtAuthenticatorPtr: jwtAuthenticatorPtr,
    		}).updateAuthenticationConfig
    
    		tokenAuthenticators = append(tokenAuthenticators,
    			authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) {
    				return jwtAuthenticatorPtr.Load().jwtAuthenticator.AuthenticateToken(ctx, token)
    			}),
    		)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 19:29:33 UTC 2024
    - 15.4K bytes
    - Viewed (0)
Back to top