- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 81 for authenticated (0.34 sec)
-
tests/test_security_api_key_cookie_description.py
def test_security_api_key_no_key(): client = TestClient(app) response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"} def test_openapi_schema(): client = TestClient(app) response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Viewed (0) -
docs/em/docs/tutorial/security/simple-oauth2.md
```Python hl_lines="55-64 67-70 88" {!> ../../../docs_src/security/tutorial003_py310.py!} ``` !!! info ๐ ๐ `WWW-Authenticate` โฎ๏ธ ๐ฒ `Bearer` ๐ฅ ๐ฌ ๐ฅ ๐ ๐. ๐ ๐บ๐ธ๐ (โ) ๐ ๐ 4๏ธโฃ0๏ธโฃ1๏ธโฃ "โ" ๐ค ๐จ `WWW-Authenticate` ๐. ๐ผ ๐จ ๐ค (๐ ๐ผ), ๐ฒ ๐ ๐ ๐ `Bearer`. ๐ ๐ช ๐ค ๐ถ ๐ โ ๐ & โซ๏ธ ๐ ๐ท. โ๏ธ โซ๏ธ ๐ ๐ฅ ๐ ๏ธ โฎ๏ธ ๐ง.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 8.9K bytes - Viewed (0) -
docs/en/docs/advanced/testing-dependencies.md
### Use cases: external service An example could be that you have an external authentication provider that you need to call. You send it a token and it returns an authenticated user. This provider might be charging you per request, and calling it might take some extra time than if you had a fixed mock user for tests.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 2.9K bytes - Viewed (0) -
tests/test_security_oauth2.py
def test_security_oauth2_password_bearer_no_header(): response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"} def test_strict_login_no_data(): response = client.post("/login") assert response.status_code == 422 assert response.json() == IsDict( { "detail": [ {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 10.7K bytes - Viewed (0) -
docs/ko/docs/tutorial/security/simple-oauth2.md
```Python hl_lines="55-64 67-70 88" {!> ../../../docs_src/security/tutorial003_py310.py!} ``` !!! ์ ๋ณด ์ฌ๊ธฐ์ ๋ฐํํ๋ ๊ฐ์ด `Bearer`์ธ ์ถ๊ฐ ํค๋ `WWW-Authenticate`๋ ์ฌ์์ ์ผ๋ถ์ ๋๋ค. ๋ชจ๋ HTTP(์ค๋ฅ) ์ํ ์ฝ๋ 401 "UNAUTHORIZED"๋ `WWW-Authenticate` ํค๋๋ ๋ฐํํด์ผ ํฉ๋๋ค. ๋ฒ ์ด๋ฌ ํ ํฐ์ ๊ฒฝ์ฐ(์ง๊ธ์ ๊ฒฝ์ฐ) ํด๋น ํค๋์ ๊ฐ์ `Bearer`์ฌ์ผ ํฉ๋๋ค. ์ค์ ๋ก ์ถ๊ฐ ํค๋๋ฅผ ๊ฑด๋๋ธ ์ ์์ผ๋ฉฐ ์ฌ์ ํ ์๋ํฉ๋๋ค. ๊ทธ๋ฌ๋ ์ฌ๊ธฐ์์๋ ์ฌ์์ ์ค์ํ๋๋ก ์ ๊ณต๋ฉ๋๋ค.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 22:37:23 GMT 2024 - 11.6K bytes - Viewed (0) -
docs/de/docs/tutorial/security/simple-oauth2.md
{!> ../../../docs_src/security/tutorial003.py!} ``` !!! info Der zusรคtzliche Header `WWW-Authenticate` mit dem Wert `Bearer`, den wir hier zurรผckgeben, ist ebenfalls Teil der Spezifikation. Jeder HTTP-(Fehler-)Statuscode 401 โUNAUTHORIZEDโ soll auch einen `WWW-Authenticate`-Header zurรผckgeben. Im Fall von Bearer-Tokens (in unserem Fall) sollte der Wert dieses Headers `Bearer` lauten.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:08:44 GMT 2024 - 14.3K bytes - Viewed (0) -
docs_src/security/tutorial004.py
form_data: OAuth2PasswordRequestForm = Depends(), ) -> Token: user = authenticate_user(fake_users_db, form_data.username, form_data.password) if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Incorrect username or password", headers={"WWW-Authenticate": "Bearer"}, )
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4K bytes - Viewed (0) -
docs_src/security/tutorial004_an.py
form_data: Annotated[OAuth2PasswordRequestForm, Depends()], ) -> Token: user = authenticate_user(fake_users_db, form_data.username, form_data.password) if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Incorrect username or password", headers={"WWW-Authenticate": "Bearer"}, )
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4.1K bytes - Viewed (0) -
docs_src/security/tutorial007_an.py
if not (is_correct_username and is_correct_password): raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Incorrect username or password", headers={"WWW-Authenticate": "Basic"}, ) return credentials.username @app.get("/users/me") def read_current_user(username: Annotated[str, Depends(get_current_username)]):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 1.2K bytes - Viewed (0) -
docs_src/security/tutorial003_an_py39.py
user = fake_decode_token(token) if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid authentication credentials", headers={"WWW-Authenticate": "Bearer"}, ) return user async def get_current_active_user( current_user: Annotated[User, Depends(get_current_user)], ): if current_user.disabled:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 2.5K bytes - Viewed (0)