- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for StatusUnauthorized (0.32 sec)
-
staging/src/k8s.io/apiserver/pkg/endpoints/filters/authn_audit_test.go
handler := WithFailedAuthenticationAudit( http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Error(w, "", http.StatusUnauthorized) }), sink, fakeRuleEvaluator) req, _ := http.NewRequest("GET", "/api/v1/namespaces/default/pods", nil) req.RemoteAddr = "127.0.0.1" req = withTestContext(req, nil, nil)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 12 21:42:41 UTC 2021 - 5.5K bytes - Viewed (0) -
src/cmd/go/internal/vcweb/auth.go
return } if username, password, ok := req.BasicAuth(); !ok || username != token.Username || password != token.Password { code := token.StatusCode if code == 0 { code = http.StatusUnauthorized } if code == http.StatusUnauthorized { w.Header().Add("WWW-Authenticate", fmt.Sprintf("basic realm=%s", accessDir)) } http.Error(w, token.Message, code) return } http.FileServer(fs).ServeHTTP(w, req)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 21 17:47:26 UTC 2023 - 2.7K bytes - Viewed (0) -
tests/integration/security/jwt_test.go
opts.HTTP.Path = "/expired-token-noauthz" opts.HTTP.Headers = headers.New().WithAuthz(jwt.TokenExpired).Build() opts.Check = check.Status(http.StatusUnauthorized) }, }, { name: "expired-token-cors-preflight-request-allowed", customizeCall: func(t framework.TestContext, from echo.Instance, opts *echo.CallOptions) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 22:02:59 UTC 2024 - 25.3K bytes - Viewed (0) -
tests/integration/security/remote_jwks/remote_jwks_test.go
opts.HTTP.Path = "/valid-token-forward-remote-jwks" opts.HTTP.Headers = headers.New().WithAuthz(jwt.TokenIssuer1).Build() opts.Check = check.And( check.NotOK(), check.Status(http.StatusUnauthorized)) }, }, { name: "remote-jwks-with-service-entry", policyFile: "./testdata/requestauthn-with-se.yaml.tmpl",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 22:02:59 UTC 2024 - 4.1K bytes - Viewed (0) -
src/net/http/status.go
StatusTemporaryRedirect = 307 // RFC 9110, 15.4.8 StatusPermanentRedirect = 308 // RFC 9110, 15.4.9 StatusBadRequest = 400 // RFC 9110, 15.5.1 StatusUnauthorized = 401 // RFC 9110, 15.5.2 StatusPaymentRequired = 402 // RFC 9110, 15.5.3 StatusForbidden = 403 // RFC 9110, 15.5.4 StatusNotFound = 404 // RFC 9110, 15.5.5
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 10 23:30:35 UTC 2022 - 7.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/policy_decision.go
Error string } func reasonToCode(r metav1.StatusReason) int32 { switch r { case metav1.StatusReasonForbidden: return http.StatusForbidden case metav1.StatusReasonUnauthorized: return http.StatusUnauthorized case metav1.StatusReasonRequestEntityTooLarge: return http.StatusRequestEntityTooLarge case metav1.StatusReasonInvalid: return http.StatusUnprocessableEntity default:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 12 18:58:24 UTC 2024 - 2.6K bytes - Viewed (0) -
pkg/test/fakes/imageregistry/main.go
log.Infof("Unauthorized: " + r.URL.Path) log.Infof("Got header %q want header %q", authHdr, wantHdr) w.Header().Set("WWW-Authenticate", "Basic") http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) return } fallthrough default: rurl := fmt.Sprintf("https://%v%v", *registry, h.convertTag(r.URL.Path)) log.Infof("Get %q, send redirect to %q", r.URL, rurl)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 6.2K bytes - Viewed (0) -
tests/integration/security/policy_attachment_only/jwt_gateway_test.go
opts.HTTP.Headers = headers.New(). WithHost(fmt.Sprintf("example.%s.com", to.ServiceName())). WithAuthz(jwt.TokenIssuer3). Build() opts.Check = check.Status(http.StatusUnauthorized) }, }, { name: "deny with sub-2 token", customizeCall: func(opts *echo.CallOptions, to echo.Target) { opts.HTTP.Path = "/" opts.HTTP.Headers = headers.New().
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 22:02:59 UTC 2024 - 9.7K bytes - Viewed (0) -
internal/config/identity/openid/provider/keycloak.go
return User{}, err } return u, nil case http.StatusNotFound: return User{ ID: userid, Enabled: false, }, nil case http.StatusUnauthorized: return User{}, ErrAccessTokenExpired } return User{}, fmt.Errorf("Unable to lookup %s - keycloak user lookup returned %v", userid, resp.Status) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Apr 29 01:27:09 UTC 2022 - 4.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/config_test.go
if err != nil { t.Fatal(err) } wrappingServer.Handler.NonGoRestfulMux.HandleFunc("/bar", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusUnauthorized) }) wrappingPostStartHookChan := make(chan struct{}) wrappingServer.AddPostStartHookOrDie("wrapping-post-start-hook", func(context PostStartHookContext) error { defer close(wrappingPostStartHookChan)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 18:59:21 UTC 2024 - 13.1K bytes - Viewed (0)