Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
impl: request a new toke when old one is expired
- resolves #130
  • Loading branch information
fioan89 committed Dec 22, 2022
commit 1ea9ff427337e68367d559ddbedcbd862d03eb2e
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Added
- ability to open a template in the Dashboard
- ability to sort by workspace name, or by template name or by workspace status
- a new token is requested when the one persisted is expired

### Changed
- renamed the plugin from `Coder Gateway` to `Gateway`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,13 @@ class CoderWorkspacesStepView(val enableNextButtonCallback: (Boolean) -> Unit) :
tfUrl?.text = url

poller?.cancel()
loginAndLoadWorkspace(token)
try {
coderClient.initClientSession(url.toURL(), token)
loginAndLoadWorkspace(token)
} catch (e: AuthenticationResponseException) {
// probably the token is expired
askTokenAndOpenSession()
}
}
}
updateWorkspaceActions()
Expand Down