- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 241 for UserName (0.21 sec)
-
docs_src/security/tutorial004_py310.py
try: payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM]) username: str = payload.get("sub") if username is None: raise credentials_exception token_data = TokenData(username=username) except JWTError: raise credentials_exception user = get_user(fake_users_db, username=token_data.username) if user is None: raise credentials_exception return user
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
assert response.json() == {"detail": "Incorrect username or password"} @needs_py39 def test_login_incorrect_username(client: TestClient): response = client.post("/token", data={"username": "foo", "password": "secret"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} @needs_py39 def test_no_token(client: TestClient):
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) -
tests/test_tutorial/test_security/test_tutorial005_py310.py
assert response.json() == {"detail": "Incorrect username or password"} @needs_py310 def test_login_incorrect_username(client: TestClient): response = client.post("/token", data={"username": "foo", "password": "secret"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} @needs_py310 def test_no_token(client: TestClient):
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) -
src/main/java/org/codelibs/fess/es/config/exentity/DataConfig.java
Java - Registered: Mon Apr 29 08:04:11 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 18.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/login/LoginAction.java
verifyToken(() -> asIndexPage(form)); final String username = form.username; final String password = form.password; form.clearSecurityInfo(); try { final HtmlResponse loginRedirect = fessLoginAssist.loginRedirect(new LocalUserCredential(username, password), op -> {}, () -> { activityHelper.login(getUserBean());
Java - Registered: Mon Apr 29 08:04:11 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 6.1K bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_an_py39.py
app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun": raise InternalError(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 700 bytes - Viewed (0) -
docs_src/security/tutorial004_an_py310.py
try: payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM]) username: str = payload.get("sub") if username is None: raise credentials_exception token_data = TokenData(username=username) except JWTError: raise credentials_exception user = get_user(fake_users_db, username=token_data.username) if user is None: raise credentials_exception return user
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/es/client/CrawlerEngineClient.java
.put("http.heartbeat_interval", fessConfig.getFesenHeartbeatInterval()); final String username = fessConfig.getFesenUsername(); final String password = fessConfig.getFesenPassword(); if (StringUtil.isNotBlank(username) && StringUtil.isNotBlank(password)) { builder.put(Constants.FESEN_USERNAME, username); builder.put(Constants.FESEN_PASSWORD, password); }
Java - Registered: Mon Apr 29 08:04:11 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 2.3K bytes - Viewed (0) -
docs_src/security/tutorial005_an.py
username: str = payload.get("sub") if username is None: 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:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.3K bytes - Viewed (0) -
docs_src/security/tutorial007_an.py
app = FastAPI() security = HTTPBasic() def get_current_username( credentials: Annotated[HTTPBasicCredentials, Depends(security)], ): current_username_bytes = credentials.username.encode("utf8") correct_username_bytes = b"stanleyjobson" is_correct_username = secrets.compare_digest( current_username_bytes, correct_username_bytes ) current_password_bytes = credentials.password.encode("utf8")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 1.2K bytes - Viewed (0)