- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 185 for me (0.05 sec)
-
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): access_token = get_access_token(scope="me", client=client) response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
def test_no_token(): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): access_token = get_access_token(scope="me") response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
istioctl/pkg/checkinject/checkinject.go
} } else if nsMatched { for _, me := range wh.ObjectSelector.MatchExpressions { switch me.Operator { case metav1.LabelSelectorOpDoesNotExist: v, ok := podLabels[me.Key] if ok { return fmt.Sprintf("Pod has %s=%s label, preventing injection", me.Key, v), false } case metav1.LabelSelectorOpNotIn: v, ok := podLabels[me.Key] if !ok { continue }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sat Apr 13 05:23:38 UTC 2024 - 9.3K bytes - Viewed (0) -
tests/test_security_http_basic_realm.py
app = FastAPI() security = HTTPBasic(realm="simple") @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.6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003.py
def test_no_token(): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8K bytes - Viewed (0) -
tests/test_security_http_digest.py
app = FastAPI() security = HTTPDigest() @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_digest(): response = client.get("/users/me", headers={"Authorization": "Digest foobar"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_openid_connect.py
user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): return current_user client = TestClient(app) def test_security_oauth2(): response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"}) 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.2K bytes - Viewed (0) -
tests/test_security_openid_connect_description.py
user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): return current_user client = TestClient(app) def test_security_oauth2(): response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"}) 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.4K bytes - Viewed (0) -
tests/test_security_http_bearer_optional.py
client = TestClient(app) def test_security_http_bearer(): response = client.get("/users/me", headers={"Authorization": "Bearer foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Bearer", "credentials": "foobar"} def test_security_http_bearer_no_credentials(): response = client.get("/users/me") 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.1K bytes - Viewed (0) -
istioctl/pkg/metrics/metrics.go
if err != nil { me = multierror.Append(me, err) } sm.p50Latency = p50Latency p90Latency, err := getLatency(promAPI, wname, wns, duration, 0.9) if err != nil { me = multierror.Append(me, err) } sm.p90Latency = p90Latency p99Latency, err := getLatency(promAPI, wname, wns, duration, 0.99) if err != nil { me = multierror.Append(me, err) } sm.p99Latency = p99Latency if me.ErrorOrNil() != nil {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sat Apr 13 05:23:38 UTC 2024 - 8.4K bytes - Viewed (0)