Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make changes to req type and parameters #3528

Merged
merged 3 commits into from
Feb 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions tests/suite/test_jwt_policies_jwksuri.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ def get_token(request):
"client_secret": request.config.getoption("--ad-secret"),
"grant_type": "client_credentials",
}
ad_response = requests.post(f"https://login.microsoftonline.com/{ad_tenant}/oauth2/token", data=data)
ad_response = requests.get(
f"https://login.microsoftonline.com/{ad_tenant}/oauth2/token",
data=data,
timeout=5,
headers={"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Chrome/76.0.3809.100"},
)

if ad_response.status_code == 200:
return ad_response.json()["access_token"]
else:
pytest.fail("Unable to request Azure token endpoint")
pytest.fail("Unable to request Azure token endpoint")


@pytest.mark.skip_for_nginx_oss
Expand All @@ -58,6 +62,7 @@ def get_token(request):
)
class TestJWTPoliciesVsJwksuri:
@pytest.mark.parametrize("jwt_virtual_server", [jwt_vs_spec_src, jwt_vs_route_src])
@pytest.mark.flaky(max_runs=3)
def test_jwt_policy_jwksuri(
self,
request,
Expand Down