Skip to content

Commit 8f25cd9

Browse files
committed
GH-5: Add basic configs of a client
1 parent 0e34059 commit 8f25cd9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/test_oauth2_middleware.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@
1010
app = FastAPI()
1111

1212
app.include_router(oauth2_router)
13-
app.add_middleware(OAuth2Middleware, config={})
13+
app.add_middleware(OAuth2Middleware, config={
14+
"allow_http": True,
15+
"clients": [
16+
OAuth2Client(
17+
backend=GithubOAuth2,
18+
client_id="test_id",
19+
client_secret="test_secret",
20+
),
21+
],
22+
})
1423

1524

1625

0 commit comments

Comments
 (0)