Skip to content

Commit b885ac0

Browse files
committed
bump
1 parent 787de65 commit b885ac0

File tree

3 files changed

+36
-11
lines changed

3 files changed

+36
-11
lines changed

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/credentials/sso/SsoLoginCallbackProvider.kt

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.intellij.ide.BrowserUtil
77
import com.intellij.openapi.progress.ProcessCanceledException
88
import software.aws.toolkits.jetbrains.core.credentials.sono.SONO_URL
99
import software.aws.toolkits.jetbrains.core.credentials.sso.bearer.ConfirmUserCodeLoginDialog
10+
import software.aws.toolkits.jetbrains.core.gettingstarted.editor.SourceOfEntry
1011
import software.aws.toolkits.jetbrains.utils.computeOnEdt
1112
import software.aws.toolkits.jetbrains.utils.isQWebviewsAvailable
1213
import software.aws.toolkits.jetbrains.utils.notifyError
@@ -39,12 +40,24 @@ class DefaultSsoLoginCallbackProvider : SsoLoginCallbackProvider {
3940

4041
interface SsoPrompt : SsoLoginCallback {
4142
override fun tokenRetrieved() {
42-
AwsTelemetry.loginWithBrowser(project = null, result = Result.Succeeded, credentialType = CredentialType.SsoProfile, authType = AuthType.DeviceCode, source= "")
43+
AwsTelemetry.loginWithBrowser(
44+
project = null,
45+
result = Result.Succeeded,
46+
credentialType = CredentialType.SsoProfile,
47+
authType = AuthType.DeviceCode,
48+
source = SourceOfEntry.UNKNOWN.toString(),
49+
)
4350
}
4451

4552
override fun tokenRetrievalFailure(e: Exception) {
4653
e.notifyError(AwsCoreBundle.message("credentials.sso.login.failed"))
47-
AwsTelemetry.loginWithBrowser(project = null, result = Result.Failed, credentialType = CredentialType.SsoProfile, authType = AuthType.DeviceCode, source= "")
54+
AwsTelemetry.loginWithBrowser(
55+
project = null,
56+
result = Result.Failed,
57+
credentialType = CredentialType.SsoProfile,
58+
authType = AuthType.DeviceCode,
59+
source = SourceOfEntry.UNKNOWN.toString(),
60+
)
4861
}
4962
}
5063

@@ -65,7 +78,7 @@ object DefaultSsoPrompt : SsoPrompt {
6578
result = Result.Cancelled,
6679
credentialType = CredentialType.SsoProfile,
6780
authType = AuthType.DeviceCode,
68-
source= "",
81+
source = SourceOfEntry.UNKNOWN.toString(),
6982
)
7083
throw ProcessCanceledException(IllegalStateException(AwsCoreBundle.message("credentials.sso.login.cancelled")))
7184
}
@@ -83,11 +96,23 @@ object SsoPromptWithBrowserSupport : SsoPrompt {
8396

8497
interface BearerTokenPrompt : SsoLoginCallback {
8598
override fun tokenRetrieved() {
86-
AwsTelemetry.loginWithBrowser(project = null, result = Result.Succeeded, credentialType = CredentialType.BearerToken, authType = AuthType.DeviceCode, source= "",)
99+
AwsTelemetry.loginWithBrowser(
100+
project = null,
101+
result = Result.Succeeded,
102+
credentialType = CredentialType.BearerToken,
103+
authType = AuthType.DeviceCode,
104+
source = "",
105+
)
87106
}
88107

89108
override fun tokenRetrievalFailure(e: Exception) {
90-
AwsTelemetry.loginWithBrowser(project = null, result = Result.Failed, credentialType = CredentialType.BearerToken, authType = AuthType.DeviceCode, source= "",)
109+
AwsTelemetry.loginWithBrowser(
110+
project = null,
111+
result = Result.Failed,
112+
credentialType = CredentialType.BearerToken,
113+
authType = AuthType.DeviceCode,
114+
source = "",
115+
)
91116
}
92117
}
93118

@@ -108,7 +133,7 @@ object DefaultBearerTokenPrompt : BearerTokenPrompt {
108133
result = Result.Cancelled,
109134
credentialType = CredentialType.BearerToken,
110135
authType = AuthType.DeviceCode,
111-
source= "",
136+
source = SourceOfEntry.UNKNOWN.toString(),
112137
)
113138
}
114139
}

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/credentials/sso/pkce/ToolkitOAuthService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ internal class ToolkitOAuthCallbackHandler : OAuthCallbackHandlerBase() {
208208
reason = error,
209209
reasonDesc = errorDescription,
210210
authType = AuthType.PKCE,
211-
source = "",
211+
source = SourceOfEntry.UNKNOWN.toString(),
212212
)
213213

214214
mapOf(

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/webview/LoginBrowser.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ abstract class LoginBrowser(
330330
reason = error.message,
331331
credentialType = CredentialType.StaticProfile,
332332
authType = AuthType.IAM,
333-
source = "",
333+
source = SourceOfEntry.LOGIN_BROWSER.toString(),
334334
)
335335
LOG.error(error) { "Profile file error" }
336336
Messages.showErrorDialog(jcefBrowser.component, error.message, AwsCoreBundle.message("gettingstarted.auth.failed"))
@@ -341,7 +341,7 @@ abstract class LoginBrowser(
341341
result = Result.Failed,
342342
reason = "Profile already exists",
343343
authType = AuthType.IAM,
344-
source = "",
344+
source = SourceOfEntry.LOGIN_BROWSER.toString(),
345345
)
346346
},
347347
{ error ->
@@ -351,7 +351,7 @@ abstract class LoginBrowser(
351351
result = Result.Failed,
352352
reason = reason,
353353
authType = AuthType.IAM,
354-
source = "",
354+
source = SourceOfEntry.LOGIN_BROWSER.toString(),
355355
)
356356
LOG.error(error) { reason }
357357
Messages.showErrorDialog(jcefBrowser.component, error.message, AwsCoreBundle.message("gettingstarted.auth.failed"))
@@ -365,7 +365,7 @@ abstract class LoginBrowser(
365365
result = Result.Succeeded,
366366
credentialType = CredentialType.StaticProfile,
367367
authType = AuthType.IAM,
368-
source = "",
368+
source = SourceOfEntry.LOGIN_BROWSER.toString(),
369369
)
370370
}
371371
}

0 commit comments

Comments
 (0)