Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for testtoken (0.2 sec)

  1. tests/test_tutorial/test_security/test_tutorial001_an.py

    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    def test_incorrect_token():
        response = client.get("/items", headers={"Authorization": "Notexistent testtoken"})
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/fess/it/ITBase.java

        public static final String DEFAULT_TEST_TOKEN_ID = "testToken";
        private static final String TEST_TOKEN = "test.token";
    
        public static String getTestToken() {
            return System.getProperty(TEST_TOKEN, DEFAULT_TEST_TOKEN);
        }
    
        public static String settingTestToken() {
            final String testToken = System.getProperty(TEST_TOKEN);
            if (testToken != null) {
                logger.info("Token: {}", testToken);
    Java
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial001.py

    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    def test_incorrect_token():
        response = client.get("/items", headers={"Authorization": "Notexistent testtoken"})
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  4. tests/test_security_oauth2_authorization_code_bearer.py

        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  5. tests/test_security_oauth2_password_bearer_optional_description.py

    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    def test_incorrect_token():
        response = client.get("/items", headers={"Authorization": "Notexistent testtoken"})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  6. tests/test_security_oauth2_password_bearer_optional.py

    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    def test_incorrect_token():
        response = client.get("/items", headers={"Authorization": "Notexistent testtoken"})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  7. tests/test_security_oauth2_authorization_code_bearer_description.py

        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial001_an_py39.py

        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    @needs_py39
    def test_incorrect_token(client: TestClient):
        response = client.get("/items", headers={"Authorization": "Notexistent testtoken"})
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial003.py

        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_incorrect_token_type():
        response = client.get(
            "/users/me", headers={"Authorization": "Notexistent testtoken"}
        )
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_inactive_user():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_security/test_tutorial003_an_py310.py

        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_incorrect_token_type(client: TestClient):
        response = client.get(
            "/users/me", headers={"Authorization": "Notexistent testtoken"}
        )
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.4K bytes
    - Viewed (0)
Back to top