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

Example code for TripletexApiClient causes exceptions #73

Open
JorgenLangemyr opened this issue Jan 12, 2023 · 0 comments
Open

Example code for TripletexApiClient causes exceptions #73

JorgenLangemyr opened this issue Jan 12, 2023 · 0 comments

Comments

@JorgenLangemyr
Copy link

JorgenLangemyr commented Jan 12, 2023

The example code for automatically generating a session token should be updated (tripletex-api2/examples/java-gradle/token/src/main/java/no/tripletex/api/v2/TripletexApiClient.java)

ZonedDateTime error:

tokenValidUntil is stored as ZonedDateTime on line 39
session token is generated with date only at line 100
but the later validity checks still use the ZonedDateTime to check if the token is valid, which includes the time component of ZonedDateTime.
This will result in Unauthorized exceptions between midnight and the time of day in the tokenValidUntil field.

StackOverflowException:
buildCall ends up calling sessionApi.delete, which in turn calls buildCall, etc.

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

No branches or pull requests

1 participant