Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 612 for user_name (0.06 sec)

  1. tests/test_security_api_key_cookie_optional.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyCookie(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: User = Depends(get_current_user)):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. tests/test_security_api_key_query_optional.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyQuery(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 Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. docs_src/configure_swagger_ui/tutorial003.py

    from fastapi import FastAPI
    
    app = FastAPI(swagger_ui_parameters={"deepLinking": False})
    
    
    @app.get("/users/{username}")
    async def read_user(username: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 201 bytes
    - Viewed (0)
  4. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/ftp/FtpAuthentication.java

            return port;
        }
    
        public void setPort(final int port) {
            this.port = port;
        }
    
        public String getUsername() {
            return username;
        }
    
        public void setUsername(final String username) {
            this.username = username;
        }
    
        public String getPassword() {
            return password;
        }
    
        public void setPassword(final String password) {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Sat Oct 12 01:40:57 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial008c_an_py39.py

            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 700 bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/request-forms.md

    ```
    
    ////
    
    НапримСр, Π² ΠΎΠ΄Π½ΠΎΠΌ ΠΈΠ· способов использования спСцификации OAuth2 (Π½Π°Π·Ρ‹Π²Π°Π΅ΠΌΠΎΠΌ "ΠΏΠΎΡ‚ΠΎΠΊΠΎΠΌ пароля") трСбуСтся ΠΎΡ‚ΠΏΡ€Π°Π²ΠΈΡ‚ΡŒ `username` ΠΈ `password` Π² Π²ΠΈΠ΄Π΅ ΠΏΠΎΠ»Π΅ΠΉ Ρ„ΠΎΡ€ΠΌΡ‹.
    
    Π”Π°Π½Π½Ρ‹ΠΉ способ Ρ‚Ρ€Π΅Π±ΡƒΠ΅Ρ‚ ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΡƒ Π΄Π°Π½Π½Ρ‹Ρ… для Π°Π²Ρ‚ΠΎΡ€ΠΈΠ·Π°Ρ†ΠΈΠΈ посрСдством Ρ„ΠΎΡ€ΠΌΡ‹ (Π° Π½Π΅ JSON) ΠΈ ΠΎΠ±ΡΠ·Π°Ρ‚Π΅Π»ΡŒΠ½ΠΎΠ³ΠΎ наличия Π² Ρ„ΠΎΡ€ΠΌΠ΅ строго ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½Π½Ρ‹Ρ… ΠΏΠΎΠ»Π΅ΠΉ  `username` ΠΈ `password`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. docs_src/request_forms/tutorial001_an_py39.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()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 223 bytes
    - Viewed (0)
  8. docs_src/security/tutorial002_an_py39.py

    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    def fake_decode_token(token):
        return User(
            username=token + "fakedecoded", email="******@****.***", full_name="John Doe"
        )
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 786 bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/app/service/UserService.java

            });
    
        }
    
        public void changePassword(final String username, final String password) {
            final boolean changed = ComponentUtil.getAuthenticationManager().changePassword(username, password);
            if (changed) {
                userBhv.selectEntity(cb -> cb.query().setName_Equal(username)).ifPresent(entity -> {
                    final String encodedPassword = fessLoginAssist.encryptPassword(password);
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. .github/workflows/sigbuild-docker.yml

            with:
              username: ${{ secrets.DOCKERHUB_USERNAME }}
              password: ${{ secrets.DOCKERHUB_TOKEN }}
          -
            name: Login to GCR
            uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
            with:
              registry: gcr.io
              username: _json_key
              password: ${{ secrets.GCP_CREDS }}
          -
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Fri Nov 01 08:40:10 UTC 2024
    - 4.3K bytes
    - Viewed (0)
Back to top