- Sort Score
- Result 10 results
- Languages All
Results 191 - 200 of 499 for broken (0.1 sec)
-
docs_src/security/tutorial003_an_py310.py
return UserInDB(**user_dict) def fake_decode_token(token): # This doesn't provide any security at all # Check the next version user = get_user(fake_users_db, token) return user async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]): user = fake_decode_token(token) if not user: raise HTTPException(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0) -
docs_src/security/tutorial001_an.py
from fastapi.security import OAuth2PasswordBearer from typing_extensions import Annotated app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") @app.get("/items/") async def read_items(token: Annotated[str, Depends(oauth2_scheme)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 319 bytes - Viewed (0) -
docs_src/security/tutorial001_an_py39.py
from fastapi import Depends, FastAPI from fastapi.security import OAuth2PasswordBearer app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") @app.get("/items/") async def read_items(token: Annotated[str, Depends(oauth2_scheme)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 309 bytes - Viewed (0) -
src/cmd/asm/internal/lex/input.go
// end of the token. It's where you are now, and you just read this token. if tok == '(' && in.Stack.Col() == prevCol+1 { // Macro has arguments. Scan list of formals. acceptArg := true args = []string{} // Zero length but not nil. Loop: for { tok = in.Stack.Next() switch tok { case ')': tok = in.Stack.Next() // First token of macro definition. break Loop
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 06 13:17:27 UTC 2024 - 12.5K bytes - Viewed (0) -
docs_src/security/tutorial004_an.py
return encoded_jwt async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]): credentials_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Could not validate credentials", headers={"WWW-Authenticate": "Bearer"}, ) try: payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM]) username: str = payload.get("sub")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0) -
cmd/auth-handler.go
} return cred, ErrAccessDenied } // Fetch the security token set by the client. func getSessionToken(r *http.Request) (token string) { token = r.Header.Get(xhttp.AmzSecurityToken) if token != "" { return token } return r.Form.Get(xhttp.AmzSecurityToken) } // Fetch claims in the security token returned by the client, doesn't return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 17 16:45:46 UTC 2024 - 26.1K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py310.py
}, }, "Token": { "title": "Token", "required": ["access_token", "token_type"], "type": "object", "properties": { "access_token": {"title": "Access Token", "type": "string"}, "token_type": {"title": "Token Type", "type": "string"}, },
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
src/archive/tar/testdata/hdr-only.tar
fifo file The quick brown fox jumped over the lazy dog! hardlink null sda symlink badlink fifo The quick brown fox jumped over the lazy dog! hardlink sda symli badlink...
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Dec 01 20:16:26 UTC 2015 - 10K bytes - Viewed (0) -
internal/config/identity/openid/jwt.go
defer r.closeRespFn(resp.Body) if resp.StatusCode != http.StatusOK { return errors.New(resp.Status) } return r.pubKeys.parseAndAdd(resp.Body) } // ErrTokenExpired - error token expired var ( ErrTokenExpired = errors.New("token expired") ) func updateClaimsExpiry(dsecs string, claims map[string]interface{}) error { expStr := claims["exp"] if expStr == "" { return ErrTokenExpired }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 02:46:36 UTC 2024 - 8.4K bytes - Viewed (0) -
docs_src/security/tutorial005.py
): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login_for_access_token( form_data: OAuth2PasswordRequestForm = Depends(), ) -> Token: user = authenticate_user(fake_users_db, form_data.username, form_data.password) if not user:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.2K bytes - Viewed (0)