- Sort Score
- Result 10 results
- Languages All
Results 171 - 180 of 1,080 for taken (0.06 sec)
-
docs/iam/identity-manager-plugin.go
}, }, } func mainHandler(w http.ResponseWriter, r *http.Request) { token := r.FormValue("token") if token == "" { writeErrorResponse(w, errors.New("token parameter not given")) return } rsp, ok := tokens[token] if !ok { w.WriteHeader(http.StatusForbidden) return } fmt.Printf("Allowed for token: %s user: %s\n", token, rsp.User) w.WriteHeader(http.StatusOK) json.NewEncoder(w).Encode(rsp)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 2.1K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional_description.py
app = FastAPI() oauth2_scheme = OAuth2PasswordBearer( tokenUrl="/token", description="OAuth2PasswordBearer security scheme", auto_error=False, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token} client = TestClient(app) def test_no_token():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt
} taskFaker.runTasks() assertEvents( "take plan 0", "plan 0 TCP connecting...", ) taskFaker.advanceUntil(250.ms) assertEvents( "take plan 1", "plan 1 TCP connecting...", ) taskFaker.advanceUntil(500.ms) assertEvents( "take plan 2", "plan 0 cancel", "plan 1 cancel", )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 24 04:40:49 UTC 2024 - 20.9K bytes - Viewed (0) -
internal/config/identity/openid/jwt_test.go
if err := updateClaimsExpiry("3600", claimsMap.MapClaims); err != nil { t.Error(err) } // Build simple token with updated expiration claim token := jwtgo.NewWithClaims(jwtgo.SigningMethodHS256, claimsMap) tokenString, err := token.SignedString(signKey) if err != nil { t.Error(err) } // Parse token to be sure it is valid err = jwtm.ParseWithClaims(tokenString, claimsMap, func(*jwtm.MapClaims) ([]byte, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 8.3K bytes - Viewed (0) -
docs/en/docs/python-types.md
## Motivation Let's start with a simple example: {* ../../docs_src/python_types/tutorial001.py *} Calling this program outputs: ``` John Doe ``` The function does the following: * Takes a `first_name` and `last_name`. * Converts the first letter of each one to upper case with `title()`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 11:47:53 UTC 2024 - 16.7K bytes - Viewed (0) -
docs_src/security/tutorial004.py
return encoded_jwt async def get_current_user(token: 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.1K bytes - Viewed (0) -
docs_src/security/tutorial004_an_py310.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.1K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py39.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) -
docs_src/security/tutorial002_an_py39.py
from pydantic import BaseModel app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="******@****.***", full_name="John Doe" )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 786 bytes - Viewed (0) -
docs_src/security/tutorial003_py310.py
user_dict = db[username] 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: 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: Fri Jan 07 14:11:31 UTC 2022 - 2.4K bytes - Viewed (0)