Skip to content

Conversation

@robsdedude
Copy link
Member

Updating the preview feature to be more in line with other drivers and support more SSO flows, of which some specify token lifetime with an absolute time value while other flows use relative time.

Now, there's both options:

  • absolute: ExpiringAuth(some_auth, expires_at=...)
  • relative: ExpiringAuth(some_auth).expires_in(...) (or doing it manually ExpiringAuth(some_auth, expires_at=time.time() + expires_in))

Updating the preview feature to be more in line with other drivers and support
more SSO flows, of which some specify token lifetime with an absolute time value
while other flows use relative time.

Now, there's both options:
 * absolute: `ExpiringAuth(some_auth, expires_at=...)`
 * relative: `ExpiringAuth(some_auth).expires_in(...)` (or doing it manually
   `ExpiringAuth(some_auth, expires_at=time.time() + expires_in)`)
@pytest.mark.parametrize(("auth1", "auth2"),
itertools.product(SAMPLE_AUTHS, repeat=2))
@pytest.mark.parametrize("expires_in", (None, -1, 1., 1, 1000.))
@pytest.mark.parametrize("expires_at", (None, -1, 1., 1, 1000.))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they really made a typo in the decorator name? ouch :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean parametrized vs. parameterized?

Seems to be a controversial topic 🔥 https://english.stackexchange.com/questions/79847/parametrise-or-parameterise-a-curve

@robsdedude robsdedude merged commit 3f5074c into neo4j:5.0 May 22, 2023
@robsdedude robsdedude deleted the expiring-auth-api branch May 22, 2023 15:09
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.

4 participants