Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 597 for userTime (0.88 sec)

  1. docs_src/security/tutorial007_an_py39.py

    1. status_code=status.HTTP_401_UNAUTHORIZED,
    2. detail="Incorrect username or password",
    3. headers={"WWW-Authenticate": "Basic"},
    4. )
    5. return credentials.username
    6.  
    7.  
    8. @app.get("/users/me")
    9. def read_current_user(username: Annotated[str, Depends(get_current_username)]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial005_an_py310.py

    1. "required": IsOneOf(
    2. ["username", "email", "full_name", "disabled"],
    3. # TODO: remove when deprecating Pydantic v1
    4. ["username"],
    5. ),
    6. "type": "object",
    7. "properties": {
    8. "username": {"title": "Username", "type": "string"},
    9. "email": IsDict(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/security/simple-oauth2.md

    1. Now let's build from the previous chapter and add the missing parts to have a complete security flow.
    2.  
    3. ## Get the `username` and `password`
    4.  
    5. We are going to use **FastAPI** security utilities to get the `username` and `password`.
    6.  
    7. OAuth2 specifies that when using the "password flow" (that we are using) the client/user must send a `username` and `password` fields as form data.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/security/simple-oauth2.md

    1. ## `username` und `password` entgegennehmen
    2.  
    3. Wir werden **FastAPIs** Sicherheits-Werkzeuge verwenden, um den `username` und das `password` entgegenzunehmen.
    4.  
    5. OAuth2 spezifiziert, dass der Client/Benutzer bei Verwendung des Password Flow (den wir verwenden) die Felder `username` und `password` als Formulardaten senden muss.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  5. docs_src/security/tutorial004.py

    1. payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
    2. username: str = payload.get("sub")
    3. if username is None:
    4. raise credentials_exception
    5. token_data = TokenData(username=username)
    6. except InvalidTokenError:
    7. raise credentials_exception
    8. user = get_user(fake_users_db, username=token_data.username)
    9. if user is None:
    10. raise credentials_exception
    11. return user
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. docs_src/security/tutorial004_an_py310.py

    1. payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
    2. username: str = payload.get("sub")
    3. if username is None:
    4. raise credentials_exception
    5. token_data = TokenData(username=username)
    6. except InvalidTokenError:
    7. raise credentials_exception
    8. user = get_user(fake_users_db, username=token_data.username)
    9. if user is None:
    10. raise credentials_exception
    11. return user
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/auth/chain/CommandChain.java

    1. public void update(final User user) {
    2. final String username = user.getName();
    3. final String password = user.getOriginalPassword();
    4. changePassword(username, password);
    5. }
    6.  
    7. @Override
    8. public void delete(final User user) {
    9. final String username = user.getName();
    10. if (isTargetUser(username)) {
    11. executeCommand(deleteCommand, username, StringUtil.EMPTY);
    12. }
    13. }
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial003_an.py

    1. assert response.json() == {"detail": "Incorrect username or password"}
    2.  
    3.  
    4. def test_login_incorrect_username():
    5. response = client.post("/token", data={"username": "foo", "password": "secret"})
    6. assert response.status_code == 400, response.text
    7. assert response.json() == {"detail": "Incorrect username or password"}
    8.  
    9.  
    10. def test_no_token():
    11. response = client.get("/users/me")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8K bytes
    - Viewed (0)
  9. tests/test_security_openid_connect.py

    1. from pydantic import BaseModel
    2.  
    3. app = FastAPI()
    4.  
    5. oid = OpenIdConnect(openIdConnectUrl="/openid")
    6.  
    7.  
    8. class User(BaseModel):
    9. username: str
    10.  
    11.  
    12. def get_current_user(oauth_header: str = Security(oid)):
    13. user = User(username=oauth_header)
    14. return user
    15.  
    16.  
    17. @app.get("/users/me")
    18. def read_current_user(current_user: User = Depends(get_current_user)):
    19. return current_user
    20.  
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  10. tests/test_security_openid_connect_description.py

    1. app = FastAPI()
    2.  
    3. oid = OpenIdConnect(
    4. openIdConnectUrl="/openid", description="OpenIdConnect security scheme"
    5. )
    6.  
    7.  
    8. class User(BaseModel):
    9. username: str
    10.  
    11.  
    12. def get_current_user(oauth_header: str = Security(oid)):
    13. user = User(username=oauth_header)
    14. return user
    15.  
    16.  
    17. @app.get("/users/me")
    18. def read_current_user(current_user: User = Depends(get_current_user)):
    19. return current_user
    20.  
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top