- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 55 for security (0.19 sec)
-
tests/test_security_oauth2.py
from dirty_equals import IsDict from fastapi import Depends, FastAPI, Security from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"}, } } )
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) -
tests/test_security_oauth2_optional.py
from typing import Optional from dirty_equals import IsDict from fastapi import Depends, FastAPI, Security from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"},
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 10.8K bytes - Viewed (0) -
tests/test_security_oauth2_optional_description.py
from typing import Optional from dirty_equals import IsDict from fastapi import Depends, FastAPI, Security from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"},
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 10.9K bytes - Viewed (0) -
docs/em/docs/advanced/security/oauth2-scopes.md
```Python hl_lines="155" {!../../../docs_src/security/tutorial005.py!} ``` ## ๐ฃ โ *โก ๐ ๏ธ* & ๐ ๐ ๐ฅ ๐ฃ ๐ *โก ๐ ๏ธ* `/users/me/items/` ๐ โ `items`. ๐, ๐ฅ ๐ & โ๏ธ `Security` โช๏ธโก๏ธ `fastapi`. ๐ ๐ช โ๏ธ `Security` ๐ฃ ๐ (๐ `Depends`), โ๏ธ `Security` ๐จ ๐ข `scopes` โฎ๏ธ ๐ โ (๐ป). ๐ ๐ผ, ๐ฅ ๐ถโโ๏ธ ๐ ๐ข `get_current_active_user` `Security` (๐ ๐ ๐ฅ ๐ โฎ๏ธ `Depends`).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 21:21:35 GMT 2024 - 11.1K bytes - Viewed (0) -
fastapi/security/http.py
[FastAPI docs for HTTP Basic Auth](https://fastapi.tiangolo.com/advanced/security/http-basic-auth/). ## Example ```python from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 15:29:38 GMT 2024 - 13.2K bytes - Viewed (0) -
fastapi/security/oauth2.py
from fastapi.openapi.models import OAuth2 as OAuth2Model from fastapi.openapi.models import OAuthFlows as OAuthFlowsModel from fastapi.param_functions import Form from fastapi.security.base import SecurityBase from fastapi.security.utils import get_authorization_scheme_param from starlette.requests import Request from starlette.status import HTTP_401_UNAUTHORIZED, HTTP_403_FORBIDDEN
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 21.1K bytes - Viewed (1) -
tests/test_tutorial/test_security/test_tutorial005_an.py
from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from docs_src.security.tutorial005_an import ( app, create_access_token, fake_users_db, get_password_hash, verify_password, ) client = TestClient(app) def get_access_token(username="johndoe", password="secret", scope=None): data = {"username": username, "password": password} if scope: data["scope"] = scope
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 15.4K bytes - Viewed (0) -
docs/en/docs/tutorial/security/oauth2-jwt.md
{!> ../../../docs_src/security/tutorial004_an_py310.py!} ``` === "Python 3.9+" ```Python hl_lines="7 48 55-56 59-60 69-75" {!> ../../../docs_src/security/tutorial004_an_py39.py!} ``` === "Python 3.8+" ```Python hl_lines="7 49 56-57 60-61 70-76" {!> ../../../docs_src/security/tutorial004_an.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py39.py
@needs_py39 def test_verify_password(): from docs_src.security.tutorial005_py39 import fake_users_db, verify_password assert verify_password("secret", fake_users_db["johndoe"]["hashed_password"]) @needs_py39 def test_get_password_hash(): from docs_src.security.tutorial005_py39 import get_password_hash assert get_password_hash("secretalice")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.3K bytes - Viewed (0) -
docs/ja/docs/tutorial/security/first-steps.md
```Python hl_lines="10" {!../../../docs_src/security/tutorial001.py!} ``` ใใฎไพๅญ้ขไฟใฏใ*path operation function*ใฎใใฉใกใผใฟใผ`token`ใซไปฃๅ ฅใใใ`str`ใๆไพใใพใใ **FastAPI**ใฏใใใฎไพๅญ้ขไฟใไฝฟ็จใใฆOpenAPIในใญใผใ (ใใใณ่ชๅAPIใใญใฅใกใณใ) ใงใใปใญใฅใชใใฃในใญใผใ ใใๅฎ็พฉใงใใใใจใ็ฅใฃใฆใใพใใ !!! info "ๆ่ก่ฉณ็ดฐ" **FastAPI**ใฏใ`OAuth2PasswordBearer` ใฏใฉใน (ไพๅญ้ขไฟใงๅฎฃ่จใใใฆใใ) ใไฝฟ็จใใฆOpenAPIใฎใปใญใฅใชใใฃในใญใผใ ใๅฎ็พฉใงใใใใจใ็ฅใฃใฆใใพใใใใใฏ`fastapi.security.oauth2.OAuth2`ใ`fastapi.security.base.SecurityBase`ใ็ถๆฟใใฆใใใใใงใใ
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 10.5K bytes - Viewed (0)