@@ -3,7 +3,6 @@ package com.coder.toolbox
33import com.coder.toolbox.cli.CoderCLIManager
44import com.coder.toolbox.sdk.CoderRestClient
55import com.coder.toolbox.sdk.v2.models.WorkspaceStatus
6- import com.coder.toolbox.settings.SettingSource
76import com.coder.toolbox.util.CoderProtocolHandler
87import com.coder.toolbox.util.DialogUi
98import com.coder.toolbox.views.Action
@@ -32,7 +31,6 @@ import kotlinx.coroutines.selects.onTimeout
3231import kotlinx.coroutines.selects.select
3332import java.net.SocketTimeoutException
3433import java.net.URI
35- import java.net.URL
3634import kotlin.coroutines.cancellation.CancellationException
3735import kotlin.time.Duration.Companion.seconds
3836import kotlin.time.TimeSource
@@ -343,21 +341,4 @@ class CoderRemoteProvider(
343341 pollJob = poll(client, cli)
344342 goToEnvironmentsPage()
345343 }
346-
347- /* *
348- * Try to find a token.
349- *
350- * Order of preference:
351- *
352- * 1. Last used token, if it was for this deployment.
353- * 2. Token on disk for this deployment.
354- * 3. Global token for Coder, if it matches the deployment.
355- */
356- private fun getToken (deploymentURL : URL ): Pair <String , SettingSource >? = context.secrets.lastToken.let {
357- if (it.isNotBlank() && context.secrets.lastDeploymentURL == deploymentURL.toString()) {
358- it to SettingSource .LAST_USED
359- } else {
360- settings.token(deploymentURL)
361- }
362- }
363344}
0 commit comments