public Password() { | public Password() { | ||||
super(JGitText.get().credentialPassword, true); | super(JGitText.get().credentialPassword, true); | ||||
} | } | ||||
/** | |||||
* Initialize a new password item, with given prompt. | |||||
* | |||||
* @param msg | |||||
* prompt message | |||||
*/ | |||||
public Password(String msg) { | |||||
super(msg, true); | |||||
} | |||||
} | } | ||||
} | } |
} | } | ||||
public boolean promptPassword(String msg) { | public boolean promptPassword(String msg) { | ||||
CredentialItem.StringType v = newPrompt(msg); | |||||
if (provider.get(uri, v)) { | |||||
password = v.getValue(); | |||||
CredentialItem.Password p = new CredentialItem.Password(msg); | |||||
if (provider.get(uri, p)) { | |||||
password = new String(p.getValue()); | |||||
return true; | return true; | ||||
} else { | } else { | ||||
password = null; | password = null; |