1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

[241716] Handle change expired password

https://bugs.eclipse.org/bugs/show_bug.cgi?id=241716
This commit is contained in:
David Dykstal 2008-08-25 02:35:33 +00:00
parent c194b121d2
commit eaabbadd92
2 changed files with 8 additions and 1 deletions

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* David Dykstal (IBM) - [210474] Deny save password function missing
* David Dykstal (IBM) - [210242] Credentials dialog should look different if password is not supported or optional
* Richie Yu (IBM) - [241716] Handle change expired password
********************************************************************************/
package org.eclipse.rse.ui.dialogs;
@ -504,6 +505,8 @@ public final class SystemPasswordPromptDialog extends SystemPromptDialog impleme
IRSESystemType systemType = connectorService.getHost().getSystemType();
ICredentials credentials = new SystemSignonInformation(hostName, userId, password, systemType);
SystemMessage m = signonValidator.validate(credentials);
// update the password in case an expired password was changed in validate - ry
password = credentials.getPassword();
setErrorMessage(m);
}
boolean closeDialog = (getErrorMessage() == null);

View file

@ -12,6 +12,7 @@
* David Dykstal (IBM) - [210474] Deny save password function missing
* David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
* Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
* Richie Yu (IBM) - [241716] Handle change expired password
********************************************************************************/
package org.eclipse.rse.ui.subsystems;
@ -206,8 +207,11 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
}
ICredentialsValidator validator = getSignonValidator();
boolean signonValid = true;
ICredentials credentials = getCredentials();
if (validator != null) {
SystemMessage m = validator.validate(getCredentials());
SystemMessage m = validator.validate(credentials);
// update the password in case an expired password was changed in validate - ry
password = credentials.getPassword();
signonValid = (m == null);
if (!signonValid) { // If we ran into an invalid stored password we need to tell the user.
Shell shell = getShell();