Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 321 for Authorize (0.28 sec)

  1. tests/test_security_oauth2_authorization_code_bearer.py

    from fastapi import FastAPI, Security
    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize", tokenUrl="token", auto_error=True
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1beta1_test.go

    			serv.statusCode = test.statusCode
    			authorized, _, err := wh.Authorize(context.Background(), test.attr)
    			if test.expectedErr && err == nil {
    				t.Fatalf("%d: Expected error", i)
    			} else if !test.expectedErr && err != nil {
    				t.Fatalf("%d: unexpected error: %v", i, err)
    			}
    
    			if test.expectedAuthorized != (authorized == authorizer.DecisionAllow) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 22:41:27 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  3. pkg/config/analysis/analyzers/testdata/absolute-envoy-filter-operation.yaml

                   "lua_cluster",
                   {
                    [":method"] = "POST",
                    [":path"] = "/acl",
                    [":authority"] = "internal.org.net"
                   },
                  "authorize call",
                  5000)
                end
      # The second patch adds the cluster that is referenced by the lua code
      # cds match is omitted as a new cluster is being added
      - applyTo: CLUSTER
        match:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 28 12:58:54 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/library/authz.go

    	GetSubresource() string
    }
    
    func NewAuthorizerVal(userInfo user.Info, authorizer authorizer.Authorizer) ref.Val {
    	return authorizerVal{receiverOnlyObjectVal: receiverOnlyVal(AuthorizerType), userInfo: userInfo, authAuthorizer: authorizer}
    }
    
    func NewResourceAuthorizerVal(userInfo user.Info, authorizer authorizer.Authorizer, requestResource Resource) ref.Val {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  5. pkg/registry/admissionregistration/validatingadmissionpolicybinding/strategy.go

    func NewStrategy(authorizer authorizer.Authorizer, policyGetter PolicyGetter, resourceResolver resolver.ResourceResolver) *validatingAdmissionPolicyBindingStrategy {
    	return &validatingAdmissionPolicyBindingStrategy{
    		ObjectTyper:      legacyscheme.Scheme,
    		NameGenerator:    names.SimpleNameGenerator,
    		authorizer:       authorizer,
    		policyGetter:     policyGetter,
    		resourceResolver: resourceResolver,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 21:29:56 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  6. plugin/pkg/admission/gc/gc_admission.go

    }
    
    func (a *gcPermissionsEnforcement) SetAuthorizer(authorizer authorizer.Authorizer) {
    	a.authorizer = authorizer
    }
    
    func (a *gcPermissionsEnforcement) SetRESTMapper(restMapper meta.RESTMapper) {
    	a.restMapper = restMapper
    }
    
    func (a *gcPermissionsEnforcement) ValidateInitialization() error {
    	if a.authorizer == nil {
    		return fmt.Errorf("missing authorizer")
    	}
    	if a.restMapper == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 02:24:38 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  7. pkg/registry/authorization/subjectaccessreview/rest.go

    	"k8s.io/apiserver/pkg/authorization/authorizer"
    	"k8s.io/apiserver/pkg/registry/rest"
    	authorizationapi "k8s.io/kubernetes/pkg/apis/authorization"
    	authorizationvalidation "k8s.io/kubernetes/pkg/apis/authorization/validation"
    	authorizationutil "k8s.io/kubernetes/pkg/registry/authorization/util"
    )
    
    type REST struct {
    	authorizer authorizer.Authorizer
    }
    
    func NewREST(authorizer authorizer.Authorizer) *REST {
    	return &REST{authorizer}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 18 09:21:13 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  8. pilot/pkg/credentials/kube/multicluster.go

    			if firstError == nil {
    				firstError = err
    			}
    		} else {
    			return k, nil
    		}
    	}
    	return nil, firstError
    }
    
    func (a *AggregateController) Authorize(serviceAccount, namespace string) error {
    	return a.authController.Authorize(serviceAccount, namespace)
    }
    
    func (a *AggregateController) AddEventHandler(f func(name string, namespace string)) {
    	// no ops
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 23 19:18:21 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  9. pkg/controller/certificates/approver/sarapprove.go

    	}
    
    	tried := []string{}
    
    	for _, r := range a.recognizers {
    		if !r.recognize(csr, x509cr) {
    			continue
    		}
    
    		tried = append(tried, r.permission.Subresource)
    
    		approved, err := a.authorize(ctx, csr, r.permission)
    		if err != nil {
    			return err
    		}
    		if approved {
    			appendApprovalCondition(csr, r.successMessage)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 21 16:03:42 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  10. pkg/kubeapiserver/authorizer/reload.go

    	current atomic.Pointer[authorizerResolver]
    }
    
    type authorizerResolver struct {
    	authorizer   authorizer.Authorizer
    	ruleResolver authorizer.RuleResolver
    }
    
    func (r *reloadableAuthorizerResolver) Authorize(ctx context.Context, a authorizer.Attributes) (authorized authorizer.Decision, reason string, err error) {
    	return r.current.Load().authorizer.Authorize(ctx, a)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:01:15 UTC 2024
    - 9.3K bytes
    - Viewed (0)
Back to top