Skip to content

Commit

Permalink
Adds access token API + fix build issue (#2)
Browse files Browse the repository at this point in the history
* Fix build issue for some OS's based on pytest

* Add access token API
  • Loading branch information
andrew-propelauth authored Mar 23, 2023
1 parent 4b14fa2 commit 795fdb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion propelauth_fastapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def _handle_forbidden_exception(e: ForbiddenException, debug_mode: bool):
"update_user_email",
"update_user_metadata",
"update_user_password",
"create_magic_link", "migrate_user_from_external_source", "create_org", "add_user_to_org",
"create_magic_link", "create_access_token",
"migrate_user_from_external_source", "create_org", "add_user_to_org",
"delete_user", "disable_user", "enable_user",
"allow_org_to_setup_saml_connection", "disallow_org_to_setup_saml_connection"
])
Expand Down Expand Up @@ -156,6 +157,7 @@ def init_auth(auth_url: str, api_key: str, token_verification_metadata: TokenVer
update_user_metadata=auth.update_user_metadata,
update_user_password=auth.update_user_password,
create_magic_link=auth.create_magic_link,
create_access_token=auth.create_access_token,
migrate_user_from_external_source=auth.migrate_user_from_external_source,
create_org=auth.create_org,
add_user_to_org=auth.add_user_to_org,
Expand Down
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
from setuptools import find_packages, setup
import pathlib
import sys

HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()

# See https://pytest-runner.readthedocs.io/en/latest/#conditional-requirement
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []

setup(
name="propelauth-fastapi",
version="2.0.1",
version="2.0.2",
description="A FastAPI library for managing authentication, backed by PropelAuth",
long_description=README,
long_description_content_type="text/markdown",
Expand All @@ -15,8 +20,8 @@
author="PropelAuth",
author_email="support@propelauth.com",
license="MIT",
install_requires=["propelauth-py", "requests"],
setup_requires=["pytest-runner"],
install_requires=["propelauth-py==3.0.3", "requests"],
setup_requires=pytest_runner,
tests_require=["pytest==4.4.1"],
test_suite="tests",
)

0 comments on commit 795fdb9

Please sign in to comment.