Skip to content

Conversation

@jarosenb
Copy link
Member

Overview:

We’ve had multiple instances where a user has a faulty Tapis access token but their refresh token is still valid. In these cases a Tapipy client cannot be instantiated (the telltale error is a 404 when listing tenants in this method). The token can only be refreshed by calling the Tapis /oauth2/tokens endpoint directly, after which their new access token is added to the Django user model.

PR Status:

  • Ready.
  • Work in Progress.
  • Hold.

Related Jira tickets:

Summary of Changes:

Catch the exception that occurs when a Tapipy client fails to instantiate, and attempt a token refresh using a direct call to the Tapis API.

Testing Steps:

Inside the Django shell:

  1. from django.contrib.auth import get_user_model()
  2. user = get_user_model().objects.get(username=<your username>)
  3. user.tapis_oauth.refresh_tokens_api()
    These steps should proceed without error and the created date on your user's access token should match when the refresh method was called.

UI Photos:

Notes:

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.

2 participants