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

Upgrade to API V2 #2

Open
urkle opened this issue Mar 12, 2020 · 0 comments
Open

Upgrade to API V2 #2

urkle opened this issue Mar 12, 2020 · 0 comments

Comments

@urkle
Copy link
Contributor

urkle commented Mar 12, 2020

We need to get this tool updated to use our V2 API and personal access tokens.

To do that we need to have the following

  1. the "authentication" action needs to be removed and replaced with an action that accepts a personal refresh token.
    a) that action should contact our authentication server to obtain an access token( see https://developer.hubstaff.com/authentication#pat )
    b) it should then persist (where the token was saved before) the access token, refresh token, and expire time (convert the expires_in to an actual timestamp/unix seconds)
  2. the API access code needs to be adjusted to utilize the access token instead now and each call should first verify that the token is not yet expired (if expire time is < 5 minutes from now refresh it and persist that new data)
  3. the endpoints calls need to be updated to their V2 counterparts.
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