Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 71 - 80 of 862 for userIds (0.04 seconds)

  1. tests/test_security_oauth2.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    reusable_oauth2 = OAuth2(
        flows={
            "password": {
                "tokenUrl": "token",
                "scopes": {"read:users": "Read the users", "write:users": "Create users"},
            }
        }
    )
    
    
    class User(BaseModel):
        username: str
    
    
    # Here we use string annotations to test them
    def get_current_user(oauth_header: "str" = Security(reusable_oauth2)):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 9.8K bytes
    - Click Count (0)
  2. tests/test_security_http_digest.py

    app = FastAPI()
    
    security = HTTPDigest()
    
    
    @app.get("/users/me")
    def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)):
        return {"scheme": credentials.scheme, "credentials": credentials.credentials}
    
    
    client = TestClient(app)
    
    
    def test_security_http_digest():
        response = client.get("/users/me", headers={"Authorization": "Digest foobar"})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 2.3K bytes
    - Click Count (0)
  3. tests/test_security_http_basic_realm_description.py

    security = HTTPBasic(realm="simple", description="HTTPBasic scheme")
    
    
    @app.get("/users/me")
    def read_current_user(credentials: HTTPBasicCredentials = Security(security)):
        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
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 2.9K bytes
    - Click Count (0)
  4. tests/test_tutorial/test_bigger_applications/test_main.py

            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/users/": {
                        "get": {
                            "tags": ["users"],
                            "summary": "Read Users",
                            "operationId": "read_users_users__get",
                            "parameters": [
                                {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 22.8K bytes
    - Click Count (0)
  5. tests/test_security_openid_connect_optional.py

        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User | None = Depends(get_current_user)):
        if current_user is None:
            return {"msg": "Create an account first"}
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_oauth2():
        response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 2.6K bytes
    - Click Count (0)
  6. compat/maven-artifact/src/main/java/org/apache/maven/repository/Proxy.java

         */
        public void setHost(String host) {
            this.host = host;
        }
    
        /**
         * Get user's password used to log in to proxy server.
         *
         * @return user's password at proxy host
         */
        public String getPassword() {
            return password;
        }
    
        /**
         * Set the user's password for the proxy server.
         *
         * @param password password to use to log in to a proxy server
         */
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 4K bytes
    - Click Count (0)
  7. clause/limit_test.go

    				Offset: 20,
    			}},
    			"SELECT * FROM `users` LIMIT ? OFFSET ?",
    			[]interface{}{limit10, 20},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Limit{Limit: &limit0}},
    			"SELECT * FROM `users` LIMIT ?",
    			[]interface{}{limit0},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Limit{Limit: &limit0}, clause.Limit{Offset: 0}},
    			"SELECT * FROM `users` LIMIT ?",
    			[]interface{}{limit0},
    		},
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 2.3K bytes
    - Click Count (0)
  8. docs/fr/docs/tutorial/bigger-applications.md

    ### Inclure les `APIRouter` pour `users` et `items` { #include-the-apirouters-for-users-and-items }
    
    Incluons maintenant les `router` des sous-modules `users` et `items` :
    
    {* ../../docs_src/bigger_applications/app_an_py310/main.py hl[10:11] title["app/main.py"] *}
    
    /// info
    
    `users.router` contient le `APIRouter` à l'intérieur du fichier `app/routers/users.py`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 21.4K bytes
    - Click Count (0)
  9. docs/es/docs/tutorial/bigger-applications.md

    ### Incluir los `APIRouter`s para `users` y `items` { #include-the-apirouters-for-users-and-items }
    
    Ahora, incluyamos los `router`s de los submódulos `users` y `items`:
    
    {* ../../docs_src/bigger_applications/app_an_py310/main.py hl[10:11] title["app/main.py"] *}
    
    /// info | Información
    
    `users.router` contiene el `APIRouter` dentro del archivo `app/routers/users.py`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 20.2K bytes
    - Click Count (0)
  10. docs/pt/docs/tutorial/bigger-applications.md

    ### Inclua os `APIRouter`s para `users` e `items` { #include-the-apirouters-for-users-and-items }
    
    Agora, vamos incluir os `router`s dos submódulos `users` e `items`:
    
    {* ../../docs_src/bigger_applications/app_an_py310/main.py hl[10:11] title["app/main.py"] *}
    
    /// info | Informação
    
    `users.router` contém o `APIRouter` dentro do arquivo `app/routers/users.py`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 20.3K bytes
    - Click Count (0)
Back to Top