You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -24,21 +25,17 @@ class ConsoleHostUserInterface : System.Management.Automation.Host.PSHostUserInt
24
25
/// this function will be modified to prompt using secure-path
25
26
/// if so configured.
26
27
/// </summary>
27
-
/// <param name="userName">Name of the user whose creds are to be prompted for. If set to null or empty string, the function will prompt for user name first.</param>
28
-
/// <param name="targetName">Name of the target for which creds are being collected.</param>
29
-
/// <param name="message">Message to be displayed.</param>
30
28
/// <param name="caption">Caption for the message.</param>
29
+
/// <param name="message">Message to be displayed.</param>
30
+
/// <param name="userName">Name of the user whose credentials are to be prompted for. If set to null or empty string, the function will prompt for user name first.</param>
31
+
/// <param name="targetName">Name of the target for which credentials are being collected.</param>
@@ -47,31 +44,62 @@ public override PSCredential PromptForCredential(
47
44
/// <summary>
48
45
/// Prompt for credentials.
49
46
/// </summary>
50
-
/// <param name="userName">Name of the user whose creds are to be prompted for. If set to null or empty string, the function will prompt for user name first.</param>
51
-
/// <param name="targetName">Name of the target for which creds are being collected.</param>
52
-
/// <param name="message">Message to be displayed.</param>
53
47
/// <param name="caption">Caption for the message.</param>
54
-
/// <param name="allowedCredentialTypes">What type of creds can be supplied by the user.</param>
55
-
/// <param name="options">Options that control the cred gathering UI behavior.</param>
48
+
/// <param name="message">Message to be displayed.</param>
49
+
/// <param name="userName">Name of the user whose credentials are to be prompted for. If set to null or empty string, the function will prompt for user name first.</param>
50
+
/// <param name="targetName">Name of the target for which credentials are being collected.</param>
51
+
/// <param name="allowedCredentialTypes">What type of credentials can be supplied by the user.</param>
52
+
/// <param name="options">Options that control the credential gathering UI behavior.</param>
56
53
/// <returns>PSCredential object, or null if input was cancelled (or if reading from stdin and stdin at EOF).</returns>
54
+
publicoverridePSCredentialPromptForCredential(
55
+
stringcaption,
56
+
stringmessage,
57
+
stringuserName,
58
+
stringtargetName,
59
+
PSCredentialTypesallowedCredentialTypes,
60
+
PSCredentialUIOptionsoptions)
61
+
{
62
+
returnPromptForCredential(
63
+
caption,
64
+
message,
65
+
userName,
66
+
confirmPassword:false,
67
+
targetName,
68
+
allowedCredentialTypes,
69
+
options);
70
+
}
57
71
72
+
/// <summary>
73
+
/// Prompt for credentials.
74
+
/// </summary>
75
+
/// <param name="caption">Caption for the message.</param>
76
+
/// <param name="message">Message to be displayed.</param>
77
+
/// <param name="userName">Name of the user whose credentials are to be prompted for. If set to null or empty string, the function will prompt for user name first.</param>
78
+
/// <param name="confirmPassword">Prompts user to re-enter the password for confirmation.</param>
79
+
/// <param name="targetName">Name of the target for which credentials are being collected.</param>
80
+
/// <param name="allowedCredentialTypes">What type of credentials can be supplied by the user.</param>
81
+
/// <param name="options">Options that control the credential gathering UI behavior.</param>
82
+
/// <returns>PSCredential object, or null if input was cancelled (or if reading from stdin and stdin at EOF).</returns>
0 commit comments