Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for AudiencesFrom (0.2 sec)

  1. 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)
  2. staging/src/k8s.io/apiserver/pkg/authentication/request/anonymous/anonymous.go

    )
    
    func NewAuthenticator() authenticator.Request {
    	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)
  3. staging/src/k8s.io/apiserver/pkg/authentication/authenticator/audagnostic.go

    import (
    	"context"
    	"fmt"
    	"net/http"
    )
    
    func authenticate(ctx context.Context, implicitAuds Audiences, authenticate func() (*Response, bool, error)) (*Response, bool, error) {
    	targetAuds, ok := AudiencesFrom(ctx)
    	// 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)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 31 22:31:49 UTC 2018
    - 2.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go

    type InsecureSuperuser struct{}
    
    func (InsecureSuperuser) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error) {
    	auds, _ := authenticator.AudiencesFrom(req.Context())
    	return &authenticator.Response{
    		User: &user.DefaultInfo{
    			Name:   "system:unsecured",
    			Groups: []string{user.SystemPrivilegedGroup, user.AllAuthenticated},
    		},
    		Audiences: auds,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 27 15:58:45 UTC 2021
    - 3.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go

    }
    
    func (a *cachedTokenAuthenticator) doAuthenticateToken(ctx context.Context, token string) *cacheRecord {
    	doneAuthenticating := stats.authenticating(ctx)
    
    	auds, audsOk := authenticator.AudiencesFrom(ctx)
    
    	key := keyFunc(a.hashPool, auds, token)
    	if record, ok := a.cache.get(key); ok {
    		// Record cache hit
    		doneAuthenticating(true)
    		return record
    	}
    
    	// Record cache miss
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9.8K bytes
    - Viewed (0)
Back to top