- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for WithAudiences (0.16 sec)
-
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go
resultUsers["audBusertoken1"] = &user.DefaultInfo{Name: "user1-different"} if u, ok, _ := a.AuthenticateToken(authenticator.WithAudiences(context.Background(), []string{"audA"}), "usertoken1"); !ok || u.User.GetName() != "user1" { t.Errorf("Expected user1") } if u, ok, _ := a.AuthenticateToken(authenticator.WithAudiences(context.Background(), []string{"audB"}), "usertoken1"); !ok || u.User.GetName() != "user1-different" {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 20.3K bytes - Viewed (0) -
pkg/serviceaccount/jwt_test.go
} authn := serviceaccount.JWTTokenAuthenticator([]string{serviceaccount.LegacyIssuer, "bar"}, tc.Keys, auds, validator) // An invalid, non-JWT token should always fail ctx := authenticator.WithAudiences(context.Background(), auds) if _, ok, err := authn.AuthenticateToken(ctx, "invalid token"); err != nil || ok { t.Errorf("%s: Expected err=nil, ok=false for non-JWT token", k) continue }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 27 22:16:08 UTC 2024 - 17K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook_v1beta1_test.go
if err != nil { t.Fatal(err) } ctx := context.Background() if tt.reqAuds != nil { ctx = authenticator.WithAudiences(ctx, tt.reqAuds) } serv.response = tt.serverResponse resp, authenticated, err := wh.AuthenticateToken(ctx, token) if err != nil { t.Fatalf("authentication failed: %v", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 18 00:47:42 UTC 2022 - 19.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook_v1_test.go
if err != nil { t.Fatal(err) } ctx := context.Background() if tt.reqAuds != nil { ctx = authenticator.WithAudiences(ctx, tt.reqAuds) } serv.response = tt.serverResponse resp, authenticated, err := wh.AuthenticateToken(ctx, token) if err != nil { t.Fatalf("authentication failed: %v", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 18 00:47:42 UTC 2022 - 19.1K bytes - Viewed (0)