- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for AuthenticateToken (0.33 sec)
-
staging/src/k8s.io/apiserver/pkg/authentication/token/union/unionauth_test.go
err error } var ( user1 = &user.DefaultInfo{Name: "fresh_ferret", UID: "alfa"} user2 = &user.DefaultInfo{Name: "elegant_sheep", UID: "bravo"} ) func (mock *mockAuthRequestHandler) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { return &authenticator.Response{User: mock.returnUser}, mock.isAuthenticated, mock.err } func TestAuthenticateTokenSecondPasses(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 22 17:16:59 UTC 2018 - 5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/token/union/union.go
} // AuthenticateToken authenticates the token using a chain of authenticator.Token objects. func (authHandler *unionAuthTokenHandler) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { var errlist []error for _, currAuthRequestHandler := range authHandler.Handlers { info, ok, err := currAuthRequestHandler.AuthenticateToken(ctx, token) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 22 17:16:59 UTC 2018 - 2.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go
} // 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) } // RequestFunc is a function that implements the Request interface.
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/plugin/pkg/authenticator/token/oidc/metrics.go
delegate AuthenticatorTokenWithHealthCheck clock clock.PassiveClock } func (a *instrumentedAuthenticator) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { start := a.clock.Now() response, ok, err := a.delegate.AuthenticateToken(ctx, token) // this only happens when issuer doesn't match the authenticator // we don't want to record metrics for this case
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 09 19:29:33 UTC 2024 - 3.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/authenticator/audagnostic.go
implicit Audiences delegate Token } var _ = Token(&audAgnosticTokenAuthenticator{}) func (a *audAgnosticTokenAuthenticator) AuthenticateToken(ctx context.Context, tok string) (*Response, bool, error) { return authenticate(ctx, a.implicit, func() (*Response, bool, error) { return a.delegate.AuthenticateToken(ctx, tok) }) } // WrapAudienceAgnosticToken wraps an audience agnostic token authenticator to
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 31 22:31:49 UTC 2018 - 2.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go
hashPool: &sync.Pool{ New: func() interface{} { return hmac.New(sha256.New, randomCacheKey) }, }, } } // AuthenticateToken implements authenticator.Token func (a *cachedTokenAuthenticator) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { record := a.doAuthenticateToken(ctx, token) if !record.ok || record.err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 9.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/group/token_group_adder.go
func NewTokenGroupAdder(auth authenticator.Token, groups []string) authenticator.Token { return &TokenGroupAdder{auth, groups} } func (g *TokenGroupAdder) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { r, ok, err := g.Authenticator.AuthenticateToken(ctx, token) if err != nil || !ok { return nil, ok, err } newGroups := make([]string, 0, len(r.User.GetGroups())+len(g.Groups))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 11 20:04:50 UTC 2022 - 1.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/metrics_test.go
t.Run(tt.name, func(t *testing.T) { jwtAuthenticatorLatencyMetric.Reset() RegisterMetrics() a := newInstrumentedAuthenticatorWithClock(testIssuer, tt.authenticator, dummyClock{}) _, _, _ = a.AuthenticateToken(context.Background(), "token") if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(tt.expectedValue), "apiserver_authentication_jwt_authenticator_latency_seconds"); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 09 19:29:33 UTC 2024 - 8.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/tokentest/tokentest.go
Tokens map[string]*user.DefaultInfo } func New() *TokenAuthenticator { return &TokenAuthenticator{ Tokens: make(map[string]*user.DefaultInfo), } } func (a *TokenAuthenticator) AuthenticateToken(ctx context.Context, value string) (*authenticator.Response, bool, error) { user, ok := a.Tokens[value] if !ok { return nil, false, nil } return &authenticator.Response{User: user}, true, nil
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 22 17:16:59 UTC 2018 - 1.1K bytes - Viewed (0) -
plugin/pkg/auth/authenticator/token/bootstrap/bootstrap.go
func tokenErrorf(s *corev1.Secret, format string, i ...interface{}) { format = fmt.Sprintf("Bootstrap secret %s/%s matching bearer token ", s.Namespace, s.Name) + format klog.V(3).Infof(format, i...) } // AuthenticateToken tries to match the provided token to a bootstrap token secret // in a given namespace. If found, it authenticates the token in the // "system:bootstrappers" group and with the "system:bootstrap:(token-id)" username. //
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 30 20:38:15 UTC 2023 - 5.1K bytes - Viewed (0)