Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 657 for user_age (0.03 sec)

  1. docs_src/dependencies/tutorial008e_an_py39.py

    
    def get_username():
        try:
            yield "Rick"
        finally:
            print("Cleanup up before response is sent")
    
    
    @app.get("/users/me")
    def get_user_me(username: Annotated[str, Depends(get_username, scope="function")]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 03 10:12:49 UTC 2025
    - 329 bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/auth/AuthenticationManager.java

         * @param username The username for which to change the password.
         * @param password The new password.
         * @return True if the password was successfully changed in all chains, false otherwise.
         */
        public boolean changePassword(final String username, final String password) {
            return chains().get(stream -> stream.allMatch(c -> c.changePassword(username, password)));
        }
    
        /**
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  3. tests/test_security_http_basic_realm_description.py

        return {"username": credentials.username, "password": credentials.password}
    
    
    client = TestClient(app)
    
    
    def test_security_http_basic():
        response = client.get("/users/me", auth=("john", "secret"))
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "john", "password": "secret"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 24 19:03:06 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  4. tests/test_security_api_key_header_optional.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyHeader(name="key", auto_error=False)
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: Optional[str] = Security(api_key)):
        if oauth_header is None:
            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: Optional[User] = Depends(get_current_user)):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/security/first-steps.md

    Então, vamos rever de um ponto de vista simplificado:
    
    * O usuário digita o `username` e o `password` no frontend e pressiona `Enter`.
    * O frontend (rodando no navegador do usuário) envia esse `username` e `password` para uma URL específica na nossa API (declarada com `tokenUrl="token"`).
    * A API verifica esse `username` e `password`, e responde com um "token" (ainda não implementamos nada disso).
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  6. docs/es/docs/tutorial/security/first-steps.md

    Así que, revisémoslo desde ese punto de vista simplificado:
    
    * El usuario escribe el `username` y `password` en el frontend, y presiona `Enter`.
    * El frontend (ejecutándose en el navegador del usuario) envía ese `username` y `password` a una URL específica en nuestra API (declarada con `tokenUrl="token"`).
    * La API verifica ese `username` y `password`, y responde con un "token" (no hemos implementado nada de esto aún).
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  7. docs/ru/docs/advanced/security/http-basic-auth.md

    Чтобы это обработать, сначала преобразуем `username` и `password` в `bytes`, закодировав их в UTF-8.
    
    Затем можно использовать `secrets.compare_digest()`, чтобы убедиться, что `credentials.username` равен `"stanleyjobson"`, а `credentials.password` — `"swordfish"`.
    
    {* ../../docs_src/security/tutorial007_an_py39.py hl[1,12:24] *}
    
    Это было бы похоже на:
    
    ```Python
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:37:11 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/security/simple-oauth2.md

    # 패스워드와 Bearer를 이용한 간단한 OAuth2
    
    이제 이전 장에서 빌드하고 누락된 부분을 추가하여 완전한 보안 흐름을 갖도록 하겠습니다.
    
    ## `username`와 `password` 얻기
    
    **FastAPI** 보안 유틸리티를 사용하여 `username` 및 `password`를 가져올 것입니다.
    
    OAuth2는 (우리가 사용하고 있는) "패스워드 플로우"을 사용할 때 클라이언트/유저가 `username` 및 `password` 필드를 폼 데이터로 보내야 함을 지정합니다.
    
    그리고 사양에는 필드의 이름을 그렇게 지정해야 한다고 나와 있습니다. 따라서 `user-name` 또는 `email`은 작동하지 않습니다.
    
    하지만 걱정하지 않아도 됩니다. 프런트엔드에서 최종 사용자에게 원하는 대로 표시할 수 있습니다.
    
    그리고 데이터베이스 모델은 원하는 다른 이름을 사용할 수 있습니다.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Feb 15 11:19:12 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  9. fastapi/security/http.py

            except (ValueError, UnicodeDecodeError, binascii.Error) as e:
                raise self.make_not_authenticated_error() from e
            username, separator, password = data.partition(":")
            if not separator:
                raise self.make_not_authenticated_error()
            return HTTPBasicCredentials(username=username, password=password)
    
    
    class HTTPBearer(HTTPBase):
        """
        HTTP Bearer token authentication.
    
        ## Usage
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  10. tests/test_security_api_key_cookie.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyCookie(name="key")
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(api_key)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User = Depends(get_current_user)):
        return current_user
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 24 19:03:06 UTC 2025
    - 2K bytes
    - Viewed (0)
Back to top