Preserve empty URL paths on OAuth metadata models (#2925)
This commit is contained in:
parent
5a3412ddc1
commit
b7a5bffed0
1 changed files with 19 additions and 3 deletions
|
|
@ -517,10 +517,10 @@ class TestOAuthFallback:
|
|||
}"""
|
||||
response = httpx.Response(200, content=content)
|
||||
|
||||
# Should set metadata
|
||||
# Should set metadata; the empty path is preserved (no trailing slash added)
|
||||
await oauth_provider._handle_oauth_metadata_response(response)
|
||||
assert oauth_provider.context.oauth_metadata is not None
|
||||
assert str(oauth_provider.context.oauth_metadata.issuer) == "https://auth.example.com/"
|
||||
assert str(oauth_provider.context.oauth_metadata.issuer) == "https://auth.example.com"
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_prioritize_www_auth_scope_over_prm(
|
||||
|
|
|
|||
Loading…
Reference in a new issue