- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 1,772 for user2 (0.04 sec)
-
docs_src/security/tutorial003_py310.py
user = UserInDB(**user_dict) hashed_password = fake_hash_password(form_data.password) if not hashed_password == user.hashed_password: raise HTTPException(status_code=400, detail="Incorrect username or password") return {"access_token": user.username, "token_type": "bearer"} @app.get("/users/me") async def read_users_me(current_user: User = Depends(get_current_active_user)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 2.4K bytes - Viewed (0) -
tests/test_security_http_basic_realm_description.py
security = HTTPBasic(realm="simple", description="HTTPBasic scheme") @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Security(security)): return {"username": credentials.username, "password": credentials.password} client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.8K bytes - Viewed (0) -
docs_src/security/tutorial004_an_py39.py
access_token = create_access_token( data={"sub": user.username}, expires_delta=access_token_expires ) return Token(access_token=access_token, token_type="bearer") @app.get("/users/me/", response_model=User) async def read_users_me( current_user: Annotated[User, Depends(get_current_active_user)], ): return current_user @app.get("/users/me/items/") async def read_own_items(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0) -
docs_src/security/tutorial004_py310.py
data={"sub": user.username}, expires_delta=access_token_expires ) return Token(access_token=access_token, token_type="bearer") @app.get("/users/me/", response_model=User) async def read_users_me(current_user: User = Depends(get_current_active_user)): return current_user @app.get("/users/me/items/") async def read_own_items(current_user: User = Depends(get_current_active_user)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4K bytes - Viewed (0) -
docs_src/security/tutorial003.py
user = UserInDB(**user_dict) hashed_password = fake_hash_password(form_data.password) if not hashed_password == user.hashed_password: raise HTTPException(status_code=400, detail="Incorrect username or password") return {"access_token": user.username, "token_type": "bearer"} @app.get("/users/me") async def read_users_me(current_user: User = Depends(get_current_active_user)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 2.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006_an_py39.py
@needs_py39 def test_security_http_basic(client: TestClient): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} @needs_py39 def test_security_http_basic_no_credentials(client: TestClient): response = client.get("/users/me") assert response.json() == {"detail": "Not authenticated"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.5K bytes - Viewed (0) -
cmd/iam-etcd-store.go
users := set.NewStringSet() for _, kv := range kvs { user := extractPathPrefixAndSuffix(string(kv.Key), prefix, path.Base(string(kv.Key))) users.Add(user) } return users } // Extract path string by stripping off the `prefix` value and the suffix, // value, usually in the following form. // // s := "config/iam/users/foo/config.json" // prefix := "config/iam/users/"
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 01:29:20 UTC 2024 - 14K bytes - Viewed (0) -
cni/pkg/install/testdata/kubeconfig-newhost
server: https://50.76.2.1:443 name: local contexts: - context: cluster: local user: istio-cni name: istio-cni-context current-context: istio-cni-context kind: Config preferences: {} users: - name: istio-cni user:
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Aug 11 01:19:03 UTC 2023 - 1.7K bytes - Viewed (0) -
helm-releases/minio-3.6.2.tgz
active return 0 } # checkUserExists ($username) # Check if the user exists, by using the exit code of `mc admin user info` checkUserExists() { USER=$1 CMD=$(${MC} admin user info myminio $USER > /dev/null 2>&1) return $? } # createUser ($username, $password, $policy) createUser() { USER=$1 PASS=$2 POLICY=$3 # Create the user if it does not exist if ! checkUserExists $USER ; then echo "Creating user '$USER'" ${MC} admin user add myminio $USER $PASS else echo "User '$USER' already exists." fi # set policy...
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 17 18:30:55 UTC 2022 - 17.9K bytes - Viewed (0) -
helm-releases/minio-5.0.6.tgz
ts[].actions[]` - list of actions granted ### Create user after install Install the chart, specifying the users you want to create after install: ```bash helm install --set users[0].accessKey=accessKey,users[0].secretKey=secretKey,users[0].policy=none,users[1].accessKey=accessKey2,users[1].secretRef=existingSecret,users[1].secretKey=password,users[1].policy=none minio/minio ``` Description of the configuration parameters used above - - `users[].accessKey` - accessKey of user - `users[].secretKey`...
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 13 06:53:06 UTC 2023 - 20.3K bytes - Viewed (0)