Skip to content

Commit 8e4df16

Browse files
committed
chore: rename library
1 parent 630978c commit 8e4df16

File tree

15 files changed

+72
-59
lines changed

15 files changed

+72
-59
lines changed

README.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,66 @@
1-
# FastAPI OIDC
1+
# FastAPI Third Party Auth
22

33
<p align="left">
4-
<a href="https://github.com/HarryMWinters/fastapi-oidc/actions?query=workflow%3ATest"
4+
<a href="https://github.com/aiwizo/fastapi-third-party-auth/actions?query=workflow%3ATest"
55
target="_blank">
6-
<img src="https://github.com/HarryMWinters/fastapi-oidc/workflows/Test/badge.svg"
6+
<img src="https://github.com/aiwizo/fastapi-third-party-auth/workflows/Test/badge.svg"
77
alt="Test">
88
</a>
9-
<a href='https://fastapi-oidc.readthedocs.io/en/latest/?badge=latest'>
10-
<img src='https://readthedocs.org/projects/fastapi-oidc/badge/?version=latest' alt='Documentation Status' />
9+
<a href='https://fastapi-third-party-auth.readthedocs.io/en/latest/?badge=latest'>
10+
<img src='https://readthedocs.org/projects/fastapi-third-party-auth/badge/?version=latest' alt='Documentation Status' />
1111
</a>
12-
<a href="https://pypi.org/project/fastapi-oidc"
12+
<a href="https://pypi.org/project/fastapi-third-party-auth"
1313
target="_blank">
14-
<img src="https://img.shields.io/pypi/v/fastapi-oidc?color=%2334D058&label=pypi%20package"
14+
<img src="https://img.shields.io/pypi/v/fastapi-third-party-auth?color=%2334D058&label=pypi%20package"
1515
alt="Package version">
1616
</a>
1717
</p>
1818

1919
---
2020

21-
**Documentation**: <a href="https://fastapi-oidc.readthedocs.io/" target="_blank">https://fastapi-oidc.readthedocs.io/</a>
21+
**Documentation**: <a href="https://fastapi-third-party-auth.readthedocs.io/" target="_blank">https://fastapi-third-party-auth.readthedocs.io/</a>
2222

23-
**Source Code**: <a href="https://github.com/HarryMWinters/fastapi-oidc" target="_blank">https://github.com/HarryMWinters/fastapi-oidc</a>
23+
**Source Code**: <a href="https://github.com/aiwizo/fastapi-third-party-auth" target="_blank">https://github.com/aiwizo/fastapi-third-party-auth</a>
2424

2525
---
2626

27-
Verify and decrypt 3rd party OpenID Connect tokens to protect your
28-
[FastAPI](https://github.com/tiangolo/fastapi) endpoints.
27+
Simple library for using a third party authentication service with
28+
[FastAPI](https://github.com/tiangolo/fastapi). Verifies and decrypts 3rd party
29+
OpenID Connect tokens to protect your endpoints.
2930

30-
Easily used with authenticators such as:
31+
Easily used with authentication services such as:
3132
- [Keycloak](https://www.keycloak.org/) (open source)
3233
- [SuperTokens](https://supertokens.io/) (open source)
3334
- [Auth0](https://auth0.com/)
3435
- [Okta](https://www.okta.com/products/authentication/)
3536

36-
FastAPI's generated interactive documentation supports the grant flows
37-
`authorization_code`, `implicit`, `password` and `client_credentials`.
37+
FastAPI's generated interactive documentation supports the grant flows:
38+
```python3
39+
GrantType.AUTHORIZATION_CODE
40+
GrantType.IMPLICIT
41+
GrantType.PASSWORD
42+
GrantType.CLIENT_CREDENTIALS
43+
```
44+
45+
![example documentation](example-docs.png)
3846

3947
## Installation
4048

4149
```
42-
poetry add fastapi-oidc
50+
poetry add fastapi-third-party-auth
4351
```
4452

4553
Or, for the old-timers:
4654

4755
```
48-
pip install fastapi-oidc
56+
pip install fastapi-third-party-auth
4957
```
5058

5159
## Usage
5260

53-
See this example for how to use `docker-compose` to set up authentication with
54-
fastapi-oidc + keycloak.
61+
See [this example](tree/master/example) for how to use
62+
`docker-compose` to set up authentication with `fastapi-third-party-auth` +
63+
[Keycloak](https://www.keycloak.org/).
5564

5665
### Standard usage
5766

@@ -61,9 +70,9 @@ from fastapi import FastAPI
6170
from fastapi import Security
6271
from fastapi import status
6372

64-
from fastapi_oidc import Auth
65-
from fastapi_oidc import GrantType
66-
from fastapi_oidc import KeycloakIDToken
73+
from fastapi_third_party_auth import Auth
74+
from fastapi_third_party_auth import GrantType
75+
from fastapi_third_party_auth import KeycloakIDToken
6776

6877
auth = Auth(
6978
openid_connect_url="http://localhost:8080/auth/realms/my-realm/.well-known/openid-configuration",

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tasks:
4545
cmds:
4646
- poetry build
4747
sources:
48-
- fastapi_oidc/**
48+
- fastapi_third_party_auth/**
4949
- poetry.lock
5050
- pyproject.toml
5151
generates:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# -- Project information -----------------------------------------------------
1919

20-
project = "fastapi-oidc"
20+
project = "fastapi-third-party-auth"
2121
copyright = "2020, Harry M. Winters"
2222
author = "Harry M. Winters"
2323

docs/index.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Welcome to fastapi-oidc's documentation!
1+
Welcome to fastapi-third-party-auth's documentation!
22
========================================
33

44
Verify and decrypt 3rd party OpenID Connect tokens to protect your
@@ -31,13 +31,13 @@ Installation
3131

3232
.. code-block:: bash
3333
34-
poetry add fastapi-oidc
34+
poetry add fastapi-third-party-auth
3535
3636
Or, for the old-timers:
3737

3838
.. code-block:: bash
3939
40-
pip install fastapi-oidc
40+
pip install fastapi-third-party-auth
4141
4242
Example
4343
-------
@@ -51,9 +51,9 @@ Basic configuration for verifying OIDC tokens.
5151
from fastapi import Security
5252
from fastapi import status
5353
54-
from fastapi_oidc import Auth
55-
from fastapi_oidc import GrantType
56-
from fastapi_oidc import KeycloakIDToken
54+
from fastapi_third_party_auth import Auth
55+
from fastapi_third_party_auth import GrantType
56+
from fastapi_third_party_auth import KeycloakIDToken
5757
5858
auth = Auth(
5959
openid_connect_url="http://localhost:8080/auth/realms/my-realm/.well-known/openid-configuration",
@@ -80,16 +80,16 @@ API Reference
8080

8181
Auth
8282
----
83-
.. automodule:: fastapi_oidc.auth
83+
.. automodule:: fastapi_third_party_auth.auth
8484
:members:
8585

8686
Grant Types
8787
-----------
88-
.. automodule:: fastapi_oidc.grant_types
88+
.. automodule:: fastapi_third_party_auth.grant_types
8989
:members:
9090
:undoc-members:
9191

9292
IDToken Types
9393
-------------
94-
.. automodule:: fastapi_oidc.idtoken_types
94+
.. automodule:: fastapi_third_party_auth.idtoken_types
9595
:members:

example-docs.png

77.9 KB
Loading

example/app/main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from fastapi.middleware.cors import CORSMiddleware
99
from starlette.responses import RedirectResponse
1010

11-
from fastapi_oidc import Auth
12-
from fastapi_oidc import KeycloakIDToken
11+
from fastapi_third_party_auth import Auth
12+
from fastapi_third_party_auth import KeycloakIDToken
1313

1414
auth = Auth(
1515
openid_connect_url="http://localhost:8080/auth/realms/my-realm/.well-known/openid-configuration",
@@ -56,6 +56,4 @@ def mixed(id_token: Optional[KeycloakIDToken] = Security(auth.optional)):
5656

5757

5858
if __name__ == "__main__":
59-
uvicorn.run(
60-
"example.main:cors", host="0.0.0.0", port=8000, loop="asyncio", reload=True
61-
)
59+
uvicorn.run("app.main:cors", host="0.0.0.0", port=8000, loop="asyncio", reload=True)

fastapi_oidc/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

fastapi_third_party_auth/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from fastapi_third_party_auth.auth import Auth # noqa
2+
from fastapi_third_party_auth.grant_types import GrantType # noqa
3+
from fastapi_third_party_auth.idtoken_types import IDToken # noqa
4+
from fastapi_third_party_auth.idtoken_types import KeycloakIDToken # noqa
5+
from fastapi_third_party_auth.idtoken_types import OktaIDToken # noqa

fastapi_oidc/auth.py renamed to fastapi_third_party_auth/auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def test_auth(authenticated_user: IDToken = Depends(auth.required)):
3737
from jose import jwt
3838
from jose.exceptions import JWTClaimsError
3939

40-
from fastapi_oidc import discovery
41-
from fastapi_oidc.grant_types import GrantType
42-
from fastapi_oidc.idtoken_types import IDToken
40+
from fastapi_third_party_auth import discovery
41+
from fastapi_third_party_auth.grant_types import GrantType
42+
from fastapi_third_party_auth.idtoken_types import IDToken
4343

4444

4545
class Auth(OAuth2):
File renamed without changes.

0 commit comments

Comments
 (0)