Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 10, 2024
1 parent 97fd6a6 commit 6eb1505
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
8 changes: 5 additions & 3 deletions examples/03-sign-key/sign-key.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

# verify your jwt
print(
VALID_SIGNATURE
if new_jwt.split(".")[2] == jwt.split(".")[2]
else INVALID_SIGNATURE,
(
VALID_SIGNATURE
if new_jwt.split(".")[2] == jwt.split(".")[2]
else INVALID_SIGNATURE
),
)
1 change: 1 addition & 0 deletions myjwt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""autogenerated"""

__version__ = "1.6.1"
__commit__ = "34a82dc12b295caaec3b5803ff553713c44765e0"
8 changes: 5 additions & 3 deletions myjwt/myjwt_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,11 @@ def myjwt_cli(jwt, **kwargs):
sys.exit(CHECK_DOCS)
new_jwt = signature(jwt_json, kwargs["verify"])
click.echo(
VALID_SIGNATURE
if new_jwt.split(".")[2] == jwt.split(".")[2]
else INVALID_SIGNATURE,
(
VALID_SIGNATURE
if new_jwt.split(".")[2] == jwt.split(".")[2]
else INVALID_SIGNATURE
),
)
if kwargs["crack"]:
jwt_json = jwt_to_json(jwt)
Expand Down
8 changes: 5 additions & 3 deletions myjwt/user_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ def user_verify_key(jwt_json: Dict, key: str) -> None:
click.echo(CHECK_DOCS)
new_jwt = signature(jwt_json, key)
click.echo(
VALID_SIGNATURE
if new_jwt.split(".")[2] == jwt_json[SIGNATURE]
else INVALID_SIGNATURE,
(
VALID_SIGNATURE
if new_jwt.split(".")[2] == jwt_json[SIGNATURE]
else INVALID_SIGNATURE
),
)


Expand Down

0 comments on commit 6eb1505

Please sign in to comment.