File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,9 @@ def get_auth(
76
76
f"Received { token_type = } "
77
77
)
78
78
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
+ )
87
82
88
83
discover = discovery .configure (cache_ttl = signature_cache_ttl )
89
84
Original file line number Diff line number Diff line change 1
1
from typing import List
2
2
3
3
from pydantic import BaseModel
4
- from pydantic import BaseSettings
5
4
from pydantic import Extra
6
5
7
6
8
- class OIDCConfig (BaseSettings ):
7
+ class OIDCConfig (BaseModel ):
9
8
client_id : str
10
9
base_authorization_server_uri : str
11
10
issuer : str
You can’t perform that action at this time.
0 commit comments