- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 63 for scope (0.38 sec)
-
fastapi/security/oauth2.py
data = {} data["scopes"] = [] for scope in form_data.scopes: data["scopes"].append(scope) if form_data.client_id: data["client_id"] = form_data.client_id if form_data.client_secret: data["client_secret"] = form_data.client_secret return data ``` Note that for OAuth2 the scope `items:read` is a single scope in an opaque string.
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
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 response = client.post("/token", data=data) content = response.json() access_token = content.get("access_token") return access_token
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/em/docs/advanced/security/oauth2-scopes.md
* ๐ โ๏ธ `oauth2_scheme`. * `security_scopes` ๐ข ๐ `SecurityScopes`: * ๐ `security_scopes` ๐ข โ๏ธ ๐ `scopes` โฎ๏ธ `list` โ ๐ ๐ซ โ ๐ฃ ๐,: * `security_scopes.scopes` ๐ ๐ `["me", "items"]` *โก ๐ ๏ธ* `read_own_items`. * `security_scopes.scopes` ๐ ๐ `["me"]` *โก ๐ ๏ธ* `read_users_me`, โฉ๏ธ โซ๏ธ ๐ฃ ๐ `get_current_active_user`.
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) -
docs/zh/docs/advanced/custom-request-and-route.md
```Python hl_lines="18-26" {!../../../docs_src/custom_request_and_route/tutorial001.py!} ``` !!! note "ๆๆฏ็ป่" `Request` ็ `request.scope` ๅฑๆงๆฏๅ ๅซๅ ณ่่ฏทๆฑๅ ๆฐๆฎ็ๅญๅ ธใ `Request` ็ `request.receive` ๆนๆณๆฏ**ๆฅๆถ**่ฏทๆฑไฝ็ๅฝๆฐใ `scope` ๅญๅ ธไธ `receive` ๅฝๆฐ้ฝๆฏ ASGI ่ง่็ๅ ๅฎนใ `scope` ไธ `receive` ไนๆฏๅๅปบๆฐ็ `Request` ๅฎไพๆ้็ใ
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:45:40 GMT 2024 - 3.8K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py39.py
client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ): data = {"username": username, "password": password} if scope: data["scope"] = scope response = client.post("/token", data=data) content = response.json() access_token = content.get("access_token") return access_token
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_src/security/tutorial005_an.py
raise credentials_exception token_scopes = payload.get("scopes", []) token_data = TokenData(scopes=token_scopes, username=username) except (JWTError, ValidationError): raise credentials_exception user = get_user(fake_users_db, username=token_data.username) if user is None: raise credentials_exception for scope in security_scopes.scopes: if scope not in token_data.scopes:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
ไธ่ฟไนไธ็จๆ ๅฟ๏ผๅ็ซฏไปๅฏไปฅๆพ็คบ็ป็ซฏ็จๆทๆ้็ๅ็งฐใ ๆฐๆฎๅบๆจกๅไนๅฏไปฅไฝฟ็จๆ้็ๅ็งฐใ ไฝๅฏนไบ็ปๅฝ*่ทฏๅพๆไฝ*๏ผๅ่ฆไฝฟ็จๅ ผๅฎน่ง่็ `username` ๅ `password`๏ผ๏ผไพๅฆ๏ผๅฎ็ฐไธ API ๆๆกฃ้ๆ๏ผใ ่ฏฅ่ง่่ฆๆฑๅฟ ้กปไปฅ่กจๅๆฐๆฎๅฝขๅผๅ้ `username` ๅ `password`๏ผๅ ๆญค๏ผไธ่ฝไฝฟ็จ JSON ๅฏน่ฑกใ ### `Scope`๏ผไฝ็จๅ๏ผ OAuth2 ่ฟๆฏๆๅฎขๆท็ซฏๅ้**`scope`**่กจๅๅญๆฎตใ ่ฝ็ถ่กจๅๅญๆฎต็ๅ็งฐๆฏ `scope`๏ผๅๆฐ๏ผ๏ผไฝๅฎ้ ไธ๏ผๅฎๆฏไปฅ็ฉบๆ ผๅ้็๏ผ็ฑๅคไธช**scope**็ปๆ็้ฟๅญ็ฌฆไธฒใ **ไฝ็จๅ**ๅชๆฏไธๅธฆ็ฉบๆ ผ็ๅญ็ฌฆไธฒใ ๅธธ็จไบๅฃฐๆๆๅฎๅฎๅ จๆ้๏ผไพๅฆ๏ผ * ๅธธ่ง็จไพไธบ๏ผ`users:read` ๆ `users:write` * ่ธไนฆๅ Instagram ไฝฟ็จ `instagram_basic`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 8.8K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
``` !!! note "Technical Details" A `Request` has a `request.scope` attribute, that's just a Python `dict` containing the metadata related to the request. A `Request` also has a `request.receive`, that's a function to "receive" the body of the request. The `scope` `dict` and `receive` function are both part of the ASGI specification. And those two things, `scope` and `receive`, are what is needed to create a new `Request` instance.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/em/docs/tutorial/security/simple-oauth2.md
& ๐ ๐ฝ ๐ท ๐ช โ๏ธ ๐ ๐ ๐ ๐ ๐. โ๏ธ ๐ณ *โก ๐ ๏ธ*, ๐ฅ ๐ช โ๏ธ ๐ ๐ ๐ โฎ๏ธ ๐ (& ๐ช, ๐ผ, โ๏ธ ๐ ๏ธ ๐ ๏ธ ๐งพ โ๏ธ). ๐ ๐ต๐ธ ๐ `username` & `password` ๐ ๐จ ๐จ ๐ฝ (, ๐ โโ ๐ป ๐ฅ). ### `scope` ๐ ๐ฌ ๐ ๐ฉโ๐ป ๐ช ๐จ โ1๏ธโฃ ๐จ ๐ "`scope`". ๐จ ๐ ๐ `scope` (โญ), โ๏ธ โซ๏ธ ๐ค ๐ ๐ป โฎ๏ธ "โ" ๐ ๐. ๐ "โ" ๐ป (๐ต ๐). ๐ซ ๐ โ๏ธ ๐ฃ ๐ฏ ๐โโ โ, ๐ผ: * `users:read` โ๏ธ `users:write` โ ๐ผ. * `instagram_basic` โ๏ธ ๐ฑ๐ / ๐ฑ๐.
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/em/docs/how-to/custom-request-and-route.md
```Python hl_lines="18-26" {!../../../docs_src/custom_request_and_route/tutorial001.py!} ``` !!! note "๐ก โน" `Request` โ๏ธ `request.scope` ๐ข, ๐ ๐ `dict` โ ๐ ๐ ๐จ. `Request` โ๏ธ `request.receive`, ๐ ๐ข "๐จ" ๐ช ๐จ. `scope` `dict` & `receive` ๐ข ๐ฏโโ๏ธ ๐ ๐ซ ๐ง. & ๐ 2๏ธโฃ ๐, `scope` & `receive`, โซ๏ธโ ๐ช โ ๐ `Request` ๐.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.6K bytes - Viewed (0)