Skip to content

Commit 83a77d8

Browse files
committed
fix: interactive docs
1 parent 31961c5 commit 83a77d8

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

fastapi_oidc/auth.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,9 @@ def get_auth(
7676
f"Received {token_type=}"
7777
)
7878

79-
# As far as I can tell the oauth2_scheme does two things.
80-
# 1. Extracts and returns the Authorization header.
81-
# 2. Integrates with the OpenAPI3.0 doc generation in FastAPI.
82-
# This integration doesn't matter much now since OpenAPI
83-
# doesn't support OpenIDConnect yet.
84-
#
85-
# Some relevant examples https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/
86-
oauth2_scheme = OpenIdConnect(openIdConnectUrl=issuer)
79+
oauth2_scheme = OpenIdConnect(
80+
openIdConnectUrl=f"{base_authorization_server_uri}/.well-known/openid-configuration"
81+
)
8782

8883
discover = discovery.configure(cache_ttl=signature_cache_ttl)
8984

fastapi_oidc/types.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from typing import List
22

33
from pydantic import BaseModel
4-
from pydantic import BaseSettings
54
from pydantic import Extra
65

76

8-
class OIDCConfig(BaseSettings):
7+
class OIDCConfig(BaseModel):
98
client_id: str
109
base_authorization_server_uri: str
1110
issuer: str

0 commit comments

Comments
 (0)