Skip to content

Commit 8ad43a6

Browse files
more details test assertions for token validator
1 parent 1040170 commit 8ad43a6

File tree

3 files changed

+103
-40
lines changed

3 files changed

+103
-40
lines changed

src/planet_auth/oidc/multi_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def validate_access_token(
286286
"""
287287

288288
if not token:
289-
raise InvalidArgumentException(message="Cannot validate empty string as a token")
289+
raise InvalidArgumentException(message="Cannot decode empty string as a token")
290290

291291
validator = self._select_validator(token)
292292
local_validation, remote_validation = self._check_access_token(

src/planet_auth/oidc/token_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def validate_token(
181181
"""
182182
# PyJWT should enforce this, but we have unit tests in case...
183183
if not token_str:
184-
raise InvalidArgumentException(message="Cannot validate empty string as a token")
184+
raise InvalidArgumentException(message="Cannot decode empty string as a token")
185185
if not issuer:
186186
# PyJWT does not seem to raise if the issuer is explicitly None, even when
187187
# verify_iss was selected.

0 commit comments

Comments
 (0)