Fix token introspection link (should be 401)
Some checks failed
/ build (push) Failing after 14s
/ test (push) Successful in 4s

This commit is contained in:
phil 2025-01-18 14:23:01 +01:00
parent 2fe7536c53
commit b96bfa870a
2 changed files with 3 additions and 2 deletions

View file

@ -281,9 +281,10 @@ async def get_introspect(
token: Annotated[OAuth2Token, Depends(get_token)],
) -> JSONResponse:
if (
response := await provider.get(
response := await provider.post(
provider.server_metadata["introspection_endpoint"],
token=token,
data={"token": token["access_token"]},
)
).is_success:
return response.json()

View file

@ -110,7 +110,7 @@
<a href="fast_api_depends" class="hidden">Using FastAPI Depends</a>
<a href="other">Other</a>
<a href="oauth2-forgejo-test">OAuth2 test (forgejo user info)</a>
<a href="introspect">Introspect token</a>
<a href="introspect">Introspect token (401 expected)</a>
</div>
{% if user_info_details %}
<div class="debug-auth">