Skip to content

Commit da144b7

Browse files
committed
fixed doctest
Signed-off-by: NAYANAR <[email protected]>
1 parent 33f6ae3 commit da144b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mcpgateway/utils/verify_credentials.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
... basic_auth_user = 'user'
1818
... basic_auth_password = 'pass'
1919
... auth_required = True
20+
... require_token_expiration = False
2021
>>> vc.settings = DummySettings()
2122
>>> import jwt
2223
>>> token = jwt.encode({'sub': 'alice'}, 'secret', algorithm='HS256')
@@ -87,6 +88,7 @@ async def verify_jwt_token(token: str) -> dict:
8788
... basic_auth_user = 'user'
8889
... basic_auth_password = 'pass'
8990
... auth_required = True
91+
... require_token_expiration = False
9092
>>> vc.settings = DummySettings()
9193
>>> import jwt
9294
>>> token = jwt.encode({'sub': 'alice'}, 'secret', algorithm='HS256')
@@ -196,6 +198,7 @@ async def verify_credentials(token: str) -> dict:
196198
... basic_auth_user = 'user'
197199
... basic_auth_password = 'pass'
198200
... auth_required = True
201+
... require_token_expiration = False
199202
>>> vc.settings = DummySettings()
200203
>>> import jwt
201204
>>> token = jwt.encode({'sub': 'alice'}, 'secret', algorithm='HS256')
@@ -236,6 +239,7 @@ async def require_auth(credentials: Optional[HTTPAuthorizationCredentials] = Dep
236239
... basic_auth_user = 'user'
237240
... basic_auth_password = 'pass'
238241
... auth_required = True
242+
... require_token_expiration = False
239243
>>> vc.settings = DummySettings()
240244
>>> import jwt
241245
>>> from fastapi.security import HTTPAuthorizationCredentials
@@ -415,6 +419,7 @@ async def require_auth_override(
415419
... basic_auth_user = 'user'
416420
... basic_auth_password = 'pass'
417421
... auth_required = True
422+
... require_token_expiration = False
418423
>>> vc.settings = DummySettings()
419424
>>> import jwt
420425
>>> import asyncio

0 commit comments

Comments
 (0)