Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 131 - 140 of 533 for user_age (0.05 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs/zh/docs/advanced/security/http-basic-auth.md

    为了解决这个问题,我们首先将 `username` 和 `password` 转换为使用 UTF-8 编码的 `bytes` 。
    
    然后我们可以使用 `secrets.compare_digest()` 来确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。
    
    {* ../../docs_src/security/tutorial007_an_py39.py hl[1,12:24] *}
    
    这类似于:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 4.2K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_security/test_tutorial007.py

        assert response.json() == {"detail": "Incorrect username or password"}
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_password(client: TestClient):
        response = client.get("/users/me", auth=("stanleyjobson", "wrongpassword"))
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  3. docs_src/response_model/tutorial003_py310.py

    from typing import Any
    
    from fastapi import FastAPI
    from pydantic import BaseModel, EmailStr
    
    app = FastAPI()
    
    
    class UserIn(BaseModel):
        username: str
        password: str
        email: EmailStr
        full_name: str | None = None
    
    
    class UserOut(BaseModel):
        username: str
        email: EmailStr
        full_name: str | None = None
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user: UserIn) -> Any:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 431 bytes
    - Click Count (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Credentials.kt

    object Credentials {
      /** Returns an auth credential for the Basic scheme. */
      @JvmStatic @JvmOverloads
      fun basic(
        username: String,
        password: String,
        charset: Charset = ISO_8859_1,
      ): String {
        val usernameAndPassword = "$username:$password"
        val encoded = usernameAndPassword.encode(charset).base64()
        return "Basic $encoded"
      }
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 1.1K bytes
    - Click Count (0)
  5. src/main/java/org/codelibs/fess/opensearch/client/CrawlerEngineClient.java

                    .put("http.heartbeat_interval", fessConfig.getFesenHeartbeatInterval());
            final String username = fessConfig.getFesenUsername();
            final String password = fessConfig.getFesenPassword();
            if (StringUtil.isNotBlank(username) && StringUtil.isNotBlank(password)) {
                builder.put(Constants.FESEN_USERNAME, username);
                builder.put(Constants.FESEN_PASSWORD, password);
            }
    Created: Sat Dec 20 09:19:18 GMT 2025
    - Last Modified: Thu Aug 07 03:06:29 GMT 2025
    - 2.6K bytes
    - Click Count (0)
  6. tests/test_tutorial/test_bigger_applications/test_main.py

        return client
    
    
    def test_users_token_jessica(client: TestClient):
        response = client.get("/users?token=jessica")
        assert response.status_code == 200
        assert response.json() == [{"username": "Rick"}, {"username": "Morty"}]
    
    
    def test_users_with_no_token(client: TestClient):
        response = client.get("/users")
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 21.3K bytes
    - Click Count (0)
  7. src/main/java/jcifs/smb1/ntlmssp/Type3Message.java

                }
                final int domainLength = domain != null ? domain.length : 0;
                final String userName = getUser();
                byte[] user = null;
                if (userName != null && userName.length() != 0) {
                    user = unicode ? userName.getBytes(UNI_ENCODING) : userName.toUpperCase().getBytes(oem);
                }
                final int userLength = user != null ? user.length : 0;
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 24.1K bytes
    - Click Count (0)
  8. docs_src/security/tutorial002_py310.py

    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: str | None = None
        full_name: str | None = None
        disabled: bool | None = None
    
    
    def fake_decode_token(token):
        return User(
            username=token + "fakedecoded", email="******@****.***", full_name="John Doe"
        )
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 711 bytes
    - Click Count (0)
  9. src/main/webapp/WEB-INF/view/admin/webauth/admin_webauth_edit.jsp

                                        <label for="username" class="col-sm-3 text-sm-right col-form-label"><la:message
                                                key="labels.webauth_username"/></label>
                                        <div class="col-sm-9">
                                            <la:errors property="username"/>
                                            <la:text styleId="username" property="username" styleClass="form-control"/>
    Created: Sat Dec 20 09:19:18 GMT 2025
    - Last Modified: Thu Nov 13 05:54:52 GMT 2025
    - 8.5K bytes
    - Click Count (0)
  10. docs_src/security/tutorial002_an_py310.py

    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: str | None = None
        full_name: str | None = None
        disabled: bool | None = None
    
    
    def fake_decode_token(token):
        return User(
            username=token + "fakedecoded", email="******@****.***", full_name="John Doe"
        )
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 761 bytes
    - Click Count (0)
Back to Top