serverAuth returns the auth scheme for server from the config, or the empty string if the server was not found in the config.
(server string)
| 346 | |
| 347 | // serverAuth returns the auth scheme for server from the config, or the empty string if the server was not found in the config. |
| 348 | func serverAuth(server string) string { |
| 349 | configOnce.Do(parseConfig) |
| 350 | alias := config.Alias(server) |
| 351 | if alias == "" { |
| 352 | return "" |
| 353 | } |
| 354 | return config.Servers[alias].Auth |
| 355 | } |
| 356 | |
| 357 | // SetupAuthFromString configures the clients authentication mode from |
| 358 | // an explicit auth string. |