blob: ff1311d41de54ae4150c13a77ac4e59aa9d5545f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*******************************************************************************
* Copyright (c) 2008 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.core;
/**
* Callback API for prompting for user information from within lower level code.
*/
public interface IServiceUI {
/**
* Authentication information returned from an authentication prompt request.
*/
public static class AuthenticationInfo {
private final boolean save;
private final String userName;
private final String password;
public AuthenticationInfo(String userName, String password, boolean saveResult) {
this.userName = userName;
this.password = password;
this.save = saveResult;
}
public boolean saveResult() {
return save;
}
public String getUserName() {
return userName;
}
public String getPassword() {
return password;
}
}
/**
* Opens a UI prompt for authentication details
*
* @param location - the location requiring login details, may be <code>null</code>.
* @return The authentication result
*/
public AuthenticationInfo getUsernamePassword(String location);
}
|