Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 41 - 50 of 645 for usernames (0.07 seconds)

  1. docs_src/configure_swagger_ui/tutorial002_py310.py

    from fastapi import FastAPI
    
    app = FastAPI(swagger_ui_parameters={"syntaxHighlight": {"theme": "obsidian"}})
    
    
    @app.get("/users/{username}")
    async def read_user(username: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 221 bytes
    - Click Count (0)
  2. docs_src/request_forms/tutorial001_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Form
    
    app = FastAPI()
    
    
    @app.post("/login/")
    async def login(username: Annotated[str, Form()], password: Annotated[str, Form()]):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 223 bytes
    - Click Count (0)
  3. docs/zh-hant/docs/tutorial/security/simple-oauth2.md

    # 簡易 OAuth2:Password 與 Bearer { #simple-oauth2-with-password-and-bearer }
    
    現在從上一章延伸,補上缺少的部分,完成整個安全流程。
    
    ## 取得 `username` 與 `password` { #get-the-username-and-password }
    
    我們要使用 **FastAPI** 提供的安全性工具來取得 `username` 與 `password`。
    
    OAuth2 規範中,當使用「password flow」(我們現在使用的)時,用戶端/使用者必須以表單資料送出 `username` 與 `password` 欄位。
    
    而且規範要求欄位名稱必須就是這兩個,所以像是 `user-name` 或 `email` 都不行。
    
    但別擔心,你在前端要怎麼呈現給最終使用者都可以。
    
    而你的資料庫模型也可以使用任何你想要的欄位名稱。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 9.1K bytes
    - Click Count (0)
  4. src/main/java/jcifs/smb/AuthenticationProvider.java

                this.domain = domain;
                this.authType = authType;
                this.timestamp = System.currentTimeMillis();
                this.clientAddress = clientAddress;
                this.serverAddress = serverAddress;
            }
    
            public String getUsername() {
                return username;
            }
    
            public String getDomain() {
                return domain;
            }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 3.9K bytes
    - Click Count (1)
  5. compat/maven-artifact/src/main/java/org/apache/maven/repository/Proxy.java

        }
    
        /**
         * Get the proxy username.
         *
         * @return username for the proxy server
         */
        public String getUserName() {
            return userName;
        }
    
        /**
         * Set the proxy username.
         *
         * @param userName username for the proxy server
         */
        public void setUserName(String userName) {
            this.userName = userName;
        }
    
        /**
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 4K bytes
    - Click Count (0)
  6. tests/test_security_oauth2_optional.py

            }
        },
        auto_error=False,
    )
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str | None = Security(reusable_oauth2)):
        if oauth_header is None:
            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.post("/login")
    def login(form_data: OAuth2PasswordRequestFormStrict = Depends()):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.8K bytes
    - Click Count (0)
  7. docs_src/bigger_applications/app_an_py310/routers/users.py

    
    @router.get("/users/", tags=["users"])
    async def read_users():
        return [{"username": "Rick"}, {"username": "Morty"}]
    
    
    @router.get("/users/me", tags=["users"])
    async def read_user_me():
        return {"username": "fakecurrentuser"}
    
    
    @router.get("/users/{username}", tags=["users"])
    async def read_user(username: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 407 bytes
    - Click Count (0)
  8. fastapi/security/oauth2.py

                    """
                ),
            ] = None,
            username: Annotated[
                str,
                Form(),
                Doc(
                    """
                    `username` string. The OAuth2 spec requires the exact field name
                    `username`.
    
                    Read more about it in the
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Mar 24 16:32:10 GMT 2026
    - 23.6K bytes
    - Click Count (0)
  9. src/main/java/org/codelibs/fess/ldap/LdapManager.java

            } catch (final Exception e) {
                logger.debug("Login failed for user: {}", username, e);
            }
            return OptionalEntity.empty();
        }
    
        /**
         * Authenticates a user with the specified username without password validation.
         *
         * @param username the username for authentication
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Jan 02 08:06:20 GMT 2026
    - 85.2K bytes
    - Click Count (0)
  10. docs_src/dependencies/tutorial008b_an_py310.py

    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id not in data:
            raise HTTPException(status_code=404, detail="Item not found")
        item = data[item_id]
        if item["owner"] != username:
            raise OwnerError(username)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 775 bytes
    - Click Count (0)
Back to Top