Skip to content

Commit

Permalink
Bump fastapi from 0.87.0 to 0.109.1 (#10)
Browse files Browse the repository at this point in the history
* Bump fastapi from 0.87.0 to 0.109.1

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.87.0 to 0.109.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.87.0...0.109.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* improved JSON response

Signed-off-by: Jürgen Eckel <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Jürgen Eckel <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jürgen Eckel <[email protected]>
  • Loading branch information
dependabot[bot] and eckelj authored Feb 28, 2024
1 parent 8ac55fd commit c8dc426
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
3 changes: 2 additions & 1 deletion cid_resolver/routers/auth.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from fastapi import APIRouter, HTTPException
from fastapi.security.http import HTTPBearer
from fastapi.responses import JSONResponse
from cid_resolver.app.JWTBearer import JWTBearer

from cid_resolver.app.auth import verify_signed_challenge, create_challenge, does_pub_key_belong_to_valid_actor
Expand All @@ -17,7 +18,7 @@
async def get_challenge(public_key: str) -> str:
if does_pub_key_belong_to_valid_actor(public_key):
challenge = create_challenge(public_key)
return {"challenge": challenge.hex()}
return JSONResponse(content={"challenge": challenge.hex()})
raise HTTPException(status_code=403, detail="Invalid public key.")


Expand Down
38 changes: 18 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ packages = [{include = "cid_resolver"}]
[tool.poetry.dependencies]
python = "^3.10"
python-decouple = "^3.6"
fastapi = "^0.87.0"
fastapi = "^0.109.1"
uvicorn = "^0.20.0"
redis = "^4.4.4"
pyjwt = "^2.7.0"
Expand Down

0 comments on commit c8dc426

Please sign in to comment.