Skip to content

Commit

Permalink
chore: Remote validation for activation keys (#283)
Browse files Browse the repository at this point in the history
In preparation for Pavex's open beta, we must move away from the
rudimental activation checks implemented in #173. This PR is a first
step in that direction.
We still use a "fixed" activation key (the same for all beta testers),
but we move validation to a remote server, api.pavex.dev.
The activation key entered by the user is forwarded to the server to:

- Check its validity
- Obtain a short-lived (2 days) CLI token

The CLI token is cached on disk, allowing Pavex to be used offline for
up to 2 days.
The cached token is refreshed in the background if it's older than 10
minutes to maximise the offline usage window. We could be more
aggressive with the refreshing logic, but I don't want to overwhelm the
server with unnecessary requests.


Misc: 

- move away from `secrecy` in favour of `redact`
- fix telemetry setup to emit an event when a span closes rather than
exits
  • Loading branch information
LukeMathWalker authored Apr 27, 2024
1 parent 4e21491 commit 9e3bec9
Show file tree
Hide file tree
Showing 15 changed files with 1,029 additions and 1,648 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
/target
Cargo.lock
Loading

0 comments on commit 9e3bec9

Please sign in to comment.