From 7ac0702487ad61e15ddabd7128f9683dc66504cf Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Sat, 21 Oct 2017 17:27:19 +0300 Subject: [PATCH] AuthType: introduce displayName & cleanup duplications --- .../platform-impl/src/com/intellij/remote/AuthType.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/remote/AuthType.kt b/platform/platform-impl/src/com/intellij/remote/AuthType.kt index dc7c033abf26..06e1f74fb2a5 100644 --- a/platform/platform-impl/src/com/intellij/remote/AuthType.kt +++ b/platform/platform-impl/src/com/intellij/remote/AuthType.kt @@ -22,5 +22,12 @@ enum class AuthType { * - read OpenSSH configuration files, get `IdentityFile` declared in it; * - use identity files provided by authentication agent (ssh-agent or PuTTY). */ - OPEN_SSH + OPEN_SSH; + + val displayName: String + get() = when (this) { + PASSWORD -> "Password" + KEY_PAIR -> "Key pair (OpenSSH or PuTTY)" + OPEN_SSH -> "OpenSSH authentication" + } } \ No newline at end of file