@@ -3,7 +3,6 @@ package com.coder.toolbox
3
3
import com.coder.toolbox.cli.CoderCLIManager
4
4
import com.coder.toolbox.sdk.CoderRestClient
5
5
import com.coder.toolbox.sdk.v2.models.WorkspaceStatus
6
- import com.coder.toolbox.settings.SettingSource
7
6
import com.coder.toolbox.util.CoderProtocolHandler
8
7
import com.coder.toolbox.util.DialogUi
9
8
import com.coder.toolbox.views.Action
@@ -32,7 +31,6 @@ import kotlinx.coroutines.selects.onTimeout
32
31
import kotlinx.coroutines.selects.select
33
32
import java.net.SocketTimeoutException
34
33
import java.net.URI
35
- import java.net.URL
36
34
import kotlin.coroutines.cancellation.CancellationException
37
35
import kotlin.time.Duration.Companion.seconds
38
36
import kotlin.time.TimeSource
@@ -343,21 +341,4 @@ class CoderRemoteProvider(
343
341
pollJob = poll(client, cli)
344
342
goToEnvironmentsPage()
345
343
}
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
- }
363
344
}
0 commit comments