Skip to content

Commit 3855a30

Browse files
Hook up log_exceptions, default false (#42)
1 parent a7e5194 commit 3855a30

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

propelauth_fastapi/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
55
from propelauth_py import (
66
TokenVerificationMetadata,
7+
configure_logging,
78
init_base_auth,
89
init_base_async_auth,
910
SamlIdpMetadata,
@@ -833,8 +834,11 @@ def init_auth(
833834
auth_url: str,
834835
api_key: str,
835836
token_verification_metadata: Optional[TokenVerificationMetadata] = None,
836-
debug_mode=False,
837+
debug_mode: bool = False,
838+
log_exceptions: bool = False,
837839
) -> FastAPIAuth:
840+
configure_logging(log_exceptions)
841+
838842
"""Fetches metadata required to validate access tokens and returns auth decorators and utilities"""
839843
return FastAPIAuth(auth_url=auth_url, integration_api_key=api_key, token_verification_metadata=token_verification_metadata, debug_mode=debug_mode)
840844

@@ -844,7 +848,10 @@ def init_auth_async(
844848
token_verification_metadata: Optional[TokenVerificationMetadata] = None,
845849
debug_mode=False,
846850
httpx_client: Optional[httpx.AsyncClient] = None,
851+
log_exceptions: bool = False,
847852
) -> FastAPIAuthAsync:
853+
configure_logging(log_exceptions)
854+
848855
"""Fetches metadata required to validate access tokens and returns auth decorators and utilities"""
849856
return FastAPIAuthAsync(auth_url=auth_url, integration_api_key=api_key, token_verification_metadata=token_verification_metadata, debug_mode=debug_mode, httpx_client=httpx_client)
850857

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fastapi
2-
propelauth-py==4.2.7
2+
propelauth-py==4.2.8
33
pytest
44
requests-mock
55
httpx

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="propelauth-fastapi",
15-
version="4.2.7",
15+
version="4.2.8",
1616
description="A FastAPI library for managing authentication, backed by PropelAuth",
1717
long_description=README,
1818
long_description_content_type="text/markdown",
@@ -21,7 +21,7 @@
2121
author="PropelAuth",
2222
author_email="support@propelauth.com",
2323
license="MIT",
24-
install_requires=["propelauth-py==4.2.7", "requests", "httpx>=0.28.1"],
24+
install_requires=["propelauth-py==4.2.8", "requests", "httpx>=0.28.1"],
2525
setup_requires=pytest_runner,
2626
tests_require=["pytest==4.4.1"],
2727
test_suite="tests",

0 commit comments

Comments
 (0)