Skip to content

Commit

Permalink
Reduce default token valid time to 500
Browse files Browse the repository at this point in the history
Using approach from fastlane/fastlane#19175

Closes #6
  • Loading branch information
Kylmakalle committed Jun 14, 2022
1 parent d17f382 commit 41b520d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions devicecheck/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
https://github.com/Kylmakalle/devicecheck
"""
__version__ = "1.2.1"
__version__ = "1.2.2"
__author__ = 'Sergey Akentev (@Kylmakalle)'
__license__ = 'MIT'
__copyright__ = 'Copyright 2021 Sergey Akentev'
Expand Down Expand Up @@ -209,12 +209,12 @@ def __init__(self, team_id: str, bundle_id: str, key_id: str, private_key: [str,
self.raise_on_error = raise_on_error
self._session = requests.Session()

def generate_token(self, valid_time: int = 1200, force_refresh=False):
def generate_token(self, valid_time: int = 500, force_refresh=False):
"""
Generate JWT token to communicate with Apple
https://help.apple.com/developer-account/#/deva05921840
:param valid_time: Set a time window in seconds for token to be valid. MAX 1200 seconds (20 minutes).
Defaults to 1200.
Defaults to 500.
:param force_refresh: `True` to refresh token on every request. `False` to use cached token. Defaults to `False`
:return:
"""
Expand Down

0 comments on commit 41b520d

Please sign in to comment.