Skip to content

Commit d81bece

Browse files
anuraagai2y
andauthored
Apply suggestions from code review
Co-authored-by: Yasushi Itoh <[email protected]> Signed-off-by: Anuraag (Rag) Agrawal <[email protected]>
1 parent a4bf7c0 commit d81bece

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/interceptors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ An authentication interceptor checking bearer tokens and storing them to a conte
193193
if not authorization or not authorization.startswith("Bearer "):
194194
raise ConnectError(Code.UNAUTHENTICATED)
195195
token = authorization[len("Bearer "):]
196-
if token not in valid_tokens:
196+
if token not in self._valid_tokens:
197197
raise ConnectError(Code.PERMISSION_DENIED)
198198
return _auth_token.set(token)
199199

@@ -217,7 +217,7 @@ An authentication interceptor checking bearer tokens and storing them to a conte
217217
if not authorization or not authorization.startswith("Bearer "):
218218
raise ConnectError(Code.UNAUTHENTICATED)
219219
token = authorization[len("Bearer "):]
220-
if token not in valid_tokens:
220+
if token not in self._valid_tokens:
221221
raise ConnectError(Code.PERMISSION_DENIED)
222222
return _auth_token.set(token)
223223

0 commit comments

Comments
 (0)