diff options
author | Tobias Oberlies | 2012-01-02 13:38:21 +0000 |
---|---|---|
committer | Tobias Oberlies | 2012-01-09 14:23:37 +0000 |
commit | c56d3086f43989513d7e3d2a149a0b6b1f82e9a7 (patch) | |
tree | 2fe59ce961a71a129c10520bf4d0ae582ad34639 /bundles/org.eclipse.equinox.p2.core | |
parent | 47549f93278cc0296730577528c106b452b43420 (diff) | |
download | rt.equinox.p2-c56d3086f43989513d7e3d2a149a0b6b1f82e9a7.tar.gz rt.equinox.p2-c56d3086f43989513d7e3d2a149a0b6b1f82e9a7.tar.xz rt.equinox.p2-c56d3086f43989513d7e3d2a149a0b6b1f82e9a7.zip |
348366 Only remember cancel if dialog explicitly signals cancelv20120109-1423
- Introduced a new constant in UIServices to give the implementations
the possibility to explicitly indicate that the user cancelled a
prompt for password.
- Only remember cancel in class Credentials on explicit user cancels.
This ensures that the authentication prompt is shown at least once.
Bug: 348366 - [repository] Cannot update from update site with authentication
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.core')
3 files changed, 13 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF index 2e227ad9d..c2d53fae2 100644 --- a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.p2.core;singleton:=true -Bundle-Version: 2.1.0.qualifier +Bundle-Version: 2.2.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.equinox.internal.p2.core.Activator Bundle-Vendor: %providerName diff --git a/bundles/org.eclipse.equinox.p2.core/pom.xml b/bundles/org.eclipse.equinox.p2.core/pom.xml index a98bfe8ab..6714ce8df 100644 --- a/bundles/org.eclipse.equinox.p2.core/pom.xml +++ b/bundles/org.eclipse.equinox.p2.core/pom.xml @@ -10,6 +10,6 @@ </parent> <groupId>org.eclipse</groupId> <artifactId>org.eclipse.equinox.p2.core</artifactId> - <version>2.1.0-SNAPSHOT</version> + <version>2.2.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java index 00d79e370..161622745 100644 --- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java +++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,6 +31,14 @@ public abstract class UIServices { public static final String SERVICE_NAME = UIServices.class.getName(); /** + * This constant may be returned by the <code>getUsernamePassword</code> methods if the user + * explicitly canceled the authentication prompt. + * + * @since 2.2 + */ + public static final AuthenticationInfo AUTHENTICATION_PROMPT_CANCELED = new AuthenticationInfo("", "", false); //$NON-NLS-1$//$NON-NLS-2$ + + /** * Authentication information returned from an authentication prompt request. */ public static class AuthenticationInfo { @@ -109,7 +117,7 @@ public abstract class UIServices { * Opens a UI prompt for authentication details * * @param location - the location requiring login details, may be <code>null</code>. - * @return The authentication result + * @return The authentication result, or <code>null</code>, or {@link #AUTHENTICATION_PROMPT_CANCELED} */ public abstract AuthenticationInfo getUsernamePassword(String location); @@ -119,7 +127,7 @@ public abstract class UIServices { * * @param location the location requiring login details * @param previousInfo - the previously used authentication details - may not be null. - * @return The authentication result + * @return The authentication result, or <code>null</code>, or {@link #AUTHENTICATION_PROMPT_CANCELED} */ public abstract AuthenticationInfo getUsernamePassword(String location, AuthenticationInfo previousInfo); |