- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for TokenFunc (0.35 sec)
-
staging/src/k8s.io/apiserver/pkg/authentication/request/bearertoken/bearertoken_test.go
"k8s.io/apiserver/pkg/authentication/user" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/warning" ) func TestAuthenticateRequest(t *testing.T) { auth := New(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: Mon Apr 25 13:22:28 UTC 2022 - 8.8K bytes - Viewed (0) -
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) -
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) -
staging/src/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go
type Request interface { AuthenticateRequest(req *http.Request) (*Response, bool, error) } // TokenFunc is a function that implements the Token interface. type TokenFunc func(ctx context.Context, token string) (*Response, bool, error) // AuthenticateToken implements authenticator.Token. func (f TokenFunc) AuthenticateToken(ctx context.Context, token string) (*Response, bool, error) { return f(ctx, token) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 12 00:55:47 UTC 2020 - 2.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/group/token_group_adder_test.go
response := &authenticator.Response{User: &user.DefaultInfo{Name: "user", Groups: append(capacity, "original")}} orig := toJson(response) adder := authenticator.Token( NewTokenGroupAdder( authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) { return response, true, nil }), []string{"added"}, ), ) r, _, _ := adder.AuthenticateToken(context.Background(), "")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 11 20:04:50 UTC 2022 - 1.6K bytes - Viewed (0) -
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)