Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

69 reuse saved jwt auth token until it expire 1 #70

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

lukasmatusiewicz
Copy link
Contributor

@lukasmatusiewicz lukasmatusiewicz commented Dec 31, 2024

This pull request includes several changes to the privacyIDEA project, focusing on refactoring the authentication token retrieval process and improving the JSON parsing logic. The most important changes include the introduction of a scheduled task for automatic token retrieval, modifications to the JSONParser class to handle token expiration, and updates to the PIConstants class to include new constants.

Authentication Token Management:

  • Added a scheduled task in PrivacyIDEA to automatically retrieve and refresh the authentication token (retrieveAuthToken method).
  • Introduced a new CountDownLatch to synchronize token retrieval and added a method to get the token (getAuthToken).

JSON Parsing Enhancements:

  • Updated the extractAuthToken method in JSONParser to return a LinkedHashMap with the token and its expiration time.
  • Modified the getItemFromAttributes method to simplify the retrieval of WebAuthn sign requests.

Constants Update:

  • Added new constants for token expiration and authorization in PIConstants.

Code Cleanup and Refactoring:

  • Refactored AsyncRequestCallable to use a final path variable and removed unnecessary code. [1] [2]
  • Simplified imports in JSONParser and PIResponse. [1] [2]

Test Adjustments:

  • All tests updated!

@lukasmatusiewicz lukasmatusiewicz linked an issue Dec 31, 2024 that may be closed by this pull request
5 tasks
@lukasmatusiewicz lukasmatusiewicz removed the request for review from nilsbehlen December 31, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reuse saved JWT auth token until it expire
1 participant