Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 1,972 for tolen (0.04 sec)

  1. docs_src/bigger_applications/app/dependencies.py

    
    async def get_token_header(x_token: str = Header()):
        if x_token != "fake-super-secret-token":
            raise HTTPException(status_code=400, detail="X-Token header invalid")
    
    
    async def get_query_token(token: str):
        if token != "jessica":
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 369 bytes
    - Viewed (0)
  2. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/annotations/KtAnnotationValue.kt

     */
    public sealed class KaAnnotationValue(override val token: KaLifetimeToken) : KaLifetimeOwner {
        public abstract val sourcePsi: KtElement?
    }
    
    public typealias KtAnnotationValue = KaAnnotationValue
    
    /**
     * This represents an unsupported expression used as an annotation value.
     */
    public class KaUnsupportedAnnotationValue @KaAnalysisApiInternals constructor(
        token: KaLifetimeToken
    ) : KaAnnotationValue(token) {
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

                    },
                    {
                        "loc": ["body", "token"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    def test_post_form_no_file(client: TestClient):
        response = client.post("/files/", data={"token": "foo"})
        assert response.status_code == 422, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

                    },
                    {
                        "loc": ["body", "token"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    @needs_py39
    def test_post_form_no_file(client: TestClient):
        response = client.post("/files/", data={"token": "foo"})
        assert response.status_code == 422, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_header_params/test_tutorial003_an_py39.py

    @needs_py39
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"X-Token values": None}),
            ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}),
            # TODO: fix this, is it a bug?
            # ("/items", [("x-token", "foo"), ("x-token", "bar")], 200, {"X-Token values": ["foo", "bar"]}),
        ],
    )
    def test(path, headers, expected_status, expected_response, client: TestClient):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  6. docs_src/bigger_applications/app_an/dependencies.py

    
    async def get_token_header(x_token: Annotated[str, Header()]):
        if x_token != "fake-super-secret-token":
            raise HTTPException(status_code=400, detail="X-Token header invalid")
    
    
    async def get_query_token(token: str):
        if token != "jessica":
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 419 bytes
    - Viewed (0)
  7. docs_src/bigger_applications/app_an_py39/dependencies.py

    
    async def get_token_header(x_token: Annotated[str, Header()]):
        if x_token != "fake-super-secret-token":
            raise HTTPException(status_code=400, detail="X-Token header invalid")
    
    
    async def get_query_token(token: str):
        if token != "jessica":
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 409 bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/authentication/request/websocket/protocol_test.go

    )
    
    func TestAuthenticateRequest(t *testing.T) {
    	auth := NewProtocolAuthenticator(authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) {
    		if token != "token" {
    			t.Errorf("unexpected token: %s", token)
    		}
    		return &authenticator.Response{User: &user.DefaultInfo{Name: "user"}}, true, nil
    	}))
    	resp, ok, err := auth.AuthenticateRequest(&http.Request{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 08 21:43:39 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  9. tests/integration/security/jwt_test.go

    						opts.HTTP.Path = "/valid-token?token_value=" + jwt.TokenIssuer1
    						opts.Check = check.Status(http.StatusForbidden)
    					},
    				},
    				{
    					name: "valid-token-set",
    					customizeCall: func(t framework.TestContext, from echo.Instance, opts *echo.CallOptions) {
    						opts.HTTP.Path = "/valid-token?token=" + jwt.TokenIssuer1 + "&secondary_token=" + jwt.TokenIssuer1
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 25.3K bytes
    - Viewed (0)
  10. security/pkg/server/ca/authenticate/kubeauth/kube_jwt_test.go

    			ctx := context.Background()
    			if tc.metadata != nil {
    				if tc.token != "" {
    					token := security.BearerTokenPrefix + tc.token
    					tc.metadata.Append("authorization", token)
    				}
    				ctx = metadata.NewIncomingContext(ctx, tc.metadata)
    			}
    
    			tokenReview := &k8sauth.TokenReview{
    				Spec: k8sauth.TokenReviewSpec{
    					Token: tc.token,
    				},
    			}
    
    			tokenReview.Status.Audiences = []string{}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top