- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 51 for escopos (0.04 sec)
-
docs/pt/docs/how-to/conditional-openapi.md
* Nunca armazene senhas em texto simples, apenas hashes de senha. * Implemente e use ferramentas criptográficas bem conhecidas, como pwdlib e tokens JWT, etc. * Adicione controles de permissão mais granulares com escopos OAuth2 quando necessário. * ...etc.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.7K bytes - Viewed (0) -
docs/es/docs/advanced/security/oauth2-scopes.md
No obstante, tú aún impones esos scopes, o cualquier otro requisito de seguridad/autorización, como necesites, en tu código. En muchos casos, OAuth2 con scopes puede ser un exceso. Pero si sabes que lo necesitas, o tienes curiosidad, sigue leyendo. /// ## Scopes de OAuth2 y OpenAPI { #oauth2-scopes-and-openapi }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 10:15:01 UTC 2025 - 14.2K bytes - Viewed (0) -
tests/test_dependency_security_overrides.py
return "john", required_scopes.scopes def get_user_override(required_scopes: SecurityScopes): return "alice", required_scopes.scopes def get_data(): return [1, 2, 3] def get_data_override(): return [3, 4, 5] @app.get("/user") def read_user( user_data: tuple[str, list[str]] = Security(get_user, scopes=["foo", "bar"]), data: list[int] = Depends(get_data),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.4K bytes - Viewed (1) -
guava-tests/test/com/google/common/html/HtmlEscapersTest.java
// If the string contains no escapes, it should return the arg. // Note: assert<b>Same</b> for this implementation. String s = "blah blah farhvergnugen"; assertSame(s, htmlEscaper().escape(s)); // Tests escapes at begin and end of string. assertEquals("<p>", htmlEscaper().escape("<p>")); // Test all escapes.Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Dec 05 22:03:28 UTC 2025 - 2.3K bytes - Viewed (0) -
tests/test_security_scopes_sub_dependency.py
call_counts["get_current_user"] += 1 return { "user": f"user_{call_counts['get_current_user']}", "scopes": security_scopes.scopes, "db_session": db_session, } def get_user_me( current_user: Annotated[dict, Security(get_current_user, scopes=["me"])], ): call_counts["get_user_me"] += 1 return {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.9K bytes - Viewed (0) -
fastapi/security/oauth2.py
""" ), ] = None, ): if not scopes: scopes = {} flows = OAuthFlowsModel( password=cast( Any, { "tokenUrl": tokenUrl, "refreshUrl": refreshUrl, "scopes": scopes, }, ) ) super().__init__(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 22K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
dependencies=[Security(oauth2_scheme, scopes=["read", "write"])], ) async def read_with_oauth2_scheme(): return {"message": "Admin Access"} @app.get( "/with-get-token", dependencies=[Security(get_token, scopes=["read", "write"])] ) async def read_with_get_token(): return {"message": "Admin Access"} router = APIRouter(dependencies=[Security(oauth2_scheme, scopes=["read"])]) @router.get("/items/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.6K bytes - Viewed (0) -
fastapi/dependencies/models.py
@cached_property def oauth_scopes(self) -> list[str]: scopes = self.parent_oauth_scopes.copy() if self.parent_oauth_scopes else [] # This doesn't use a set to preserve order, just in case for scope in self.own_oauth_scopes or []: if scope not in scopes: scopes.append(scope) return scopes @cached_property def cache_key(self) -> DependencyCacheKey:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 7.1K bytes - Viewed (0) -
tests/test_security_scopes_dont_propagate.py
from fastapi.testclient import TestClient async def security1(scopes: SecurityScopes): return scopes.scopes async def security2(scopes: SecurityScopes): return scopes.scopes async def dep3( dep1: Annotated[list[str], Security(security1, scopes=["scope1"])], dep2: Annotated[list[str], Security(security2, scopes=["scope2"])], ): return {"dep1": dep1, "dep2": dep2} app = FastAPI()
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 973 bytes - Viewed (0) -
tests/test_dependency_paramless.py
return {"token": credentials, "scopes": security_scopes.scopes} @app.get("/get-credentials") def get_credentials( credentials: Annotated[dict, Security(process_auth, scopes=["a", "b"])], ): return credentials @app.get( "/parameterless-with-scopes", dependencies=[Security(process_auth, scopes=["a", "b"])], ) def get_parameterless_with_scopes(): return {"status": "ok"} @app.get(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.3K bytes - Viewed (0)