- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 2,345 for auds (0.05 sec)
-
staging/src/k8s.io/apiserver/pkg/authentication/authenticator/audiences_test.go
func TestIntersect(t *testing.T) { cs := []struct { auds, tauds Audiences expected Audiences }{ { auds: nil, tauds: nil, expected: Audiences{}, }, { auds: nil, tauds: Audiences{"foo"}, expected: Audiences{}, }, { auds: Audiences{}, tauds: Audiences{}, expected: Audiences{}, }, { auds: Audiences{"foo"}, tauds: Audiences{},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 31 21:50:11 UTC 2018 - 1.7K bytes - Viewed (0) -
pkg/registry/authentication/tokenreview/storage.go
fakeReq := &http.Request{Header: http.Header{}} fakeReq.Header.Add("Authorization", "Bearer "+tokenReview.Spec.Token) auds := tokenReview.Spec.Audiences if len(auds) == 0 { auds = r.apiAudiences } if len(auds) > 0 { fakeReq = fakeReq.WithContext(authenticator.WithAudiences(fakeReq.Context(), auds)) } resp, ok, err := r.tokenAuthenticator.AuthenticateRequest(fakeReq) tokenReview.Status.Authenticated = ok
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 18 09:21:13 UTC 2022 - 3.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/authenticator/audiences.go
func WithAudiences(ctx context.Context, auds Audiences) context.Context { return context.WithValue(ctx, audiencesKey, auds) } // AudiencesFrom returns a request's expected audiences stored in the request context. func AudiencesFrom(ctx context.Context) (Audiences, bool) { auds, ok := ctx.Value(audiencesKey).(Audiences) return auds, ok } // Has checks if Audiences contains a specific audiences.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 31 21:50:11 UTC 2018 - 1.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/authenticator/audagnostic_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:16 UTC 2023 - 4.9K bytes - Viewed (0) -
pkg/registry/core/serviceaccount/storage/storage.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 21:15:10 UTC 2023 - 3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go
User: &user.DefaultInfo{Name: fmt.Sprintf("holder of token %v", i)}, }, } // make different combinations of audience, failures, denies for the tokens. auds := []string{} for i := 0; i < rr.Intn(4); i++ { auds = append(auds, string(uuid.NewUUID())) } choice := rr.Float64() switch { case choice < 0.9: r.ok = true r.err = nil
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/request/anonymous/anonymous.go
return authenticator.RequestFunc(func(req *http.Request) (*authenticator.Response, bool, error) { auds, _ := authenticator.AudiencesFrom(req.Context()) return &authenticator.Response{ User: &user.DefaultInfo{ Name: anonymousUser, Groups: []string{unauthenticatedGroup}, }, Audiences: auds, }, true, nil })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 31 21:50:11 UTC 2018 - 1.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go
func keyFunc(hashPool *sync.Pool, auds []string, token string) string { h := hashPool.Get().(hash.Hash) h.Reset() // try to force stack allocation var a [4]byte b := a[:] writeLengthPrefixedString(h, b, token) // encode the length of audiences to avoid ambiguities writeLength(h, b, len(auds)) for _, aud := range auds { writeLengthPrefixedString(h, b, aud) }
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/authenticator/audagnostic.go
// We can remove this once api audiences is never empty. That will probably // be N releases after TokenRequest is GA. if !ok { return authenticate() } auds := implicitAuds.Intersect(targetAuds) if len(auds) == 0 { return nil, false, nil } resp, ok, err := authenticate() if err != nil || !ok { return nil, false, err } if len(resp.Audiences) > 0 {
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/plugin/pkg/authenticator/token/webhook/webhook.go
return nil, false, err } if checkAuds { gotAuds := w.implicitAuds if len(result.Status.Audiences) > 0 { gotAuds = result.Status.Audiences } auds = wantAuds.Intersect(gotAuds) if len(auds) == 0 { return nil, false, nil } } r.Status = result.Status if !r.Status.Authenticated { var err error if len(r.Status.Error) != 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 18 00:47:42 UTC 2022 - 11.5K bytes - Viewed (0)