|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.core.subsystems.AbstractCredentialsProvider
org.eclipse.rse.ui.subsystems.StandardCredentialsProvider
public class StandardCredentialsProvider
The StandardCredentialsProvider
is an extension of
AbstractCredentialsProvider
that provides for the prompting of a userid
and password.
It uses a PasswordPersistenceManager
to store the passwords in the
keychain keyed by IHost
and possibly by ISubSystemConfiguration
.
This is suitable for use by subclasses of StandardConnectorService
that wish to provide prompting and persistence for userids and passwords when
connecting.
This class is may be subclassed. Typically to provide connector service specific prompting.
Constructor Summary | |
---|---|
StandardCredentialsProvider(IConnectorService connectorService)
Creates a standard credentials provider for a connector service. |
Method Summary | |
---|---|
void |
acquireCredentials(boolean reacquire)
Acquires the credentials (userid and password) for this connector service. |
void |
clearCredentials()
Clears the credentials known by this credentials provider. |
void |
clearPassword()
If the credentials include a password or equivalent then clears only that that portion of the credentials. |
ICredentials |
getCredentials()
Retrieves the credentials known to this credentials provider. |
protected ISystemPasswordPromptDialog |
getPasswordPromptDialog(Shell shell)
A default implementation is supplied, but can be overridden if desired. |
protected ICredentialsValidator |
getSignonValidator()
Optionally overridable, not implemented by default. |
String |
getUserId()
If the credentials include a user id then retrieve that user id. |
void |
repairCredentials(SystemMessage prompt)
The connector service using this provider may find the credentials provided are incorrector or expired. |
void |
setPassword(String password)
If the credentials include a password or equivalent then set that password to the new value. |
void |
setPassword(String matchingUserId,
String password,
boolean persist)
Useful utility method. |
void |
setUserId(String newId)
If the credentials include a user id then set that user id to the new value. |
Methods inherited from class org.eclipse.rse.core.subsystems.AbstractCredentialsProvider |
---|
getConnectorService, isSuppressed, requiresPassword, requiresUserId, setSuppressed, supportsPassword, supportsUserId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardCredentialsProvider(IConnectorService connectorService)
connectorService
- the connector service associated with this
provider.IConnectorService
Method Detail |
---|
public final void acquireCredentials(boolean reacquire) throws OperationCanceledException
reacquire
- if true then present the prompt even if the password was
found and is valid.
OperationCanceledException
- if user is prompted and user cancels
that prompt or if AbstractCredentialsProvider.isSuppressed()
is true. Before RSE 3.0,
the method would have thrown InterruptedException
in that
case.public final void clearCredentials()
ICredentialsProvider
public final void clearPassword()
ICredentialsProvider
public final ICredentials getCredentials()
ICredentialsProvider
ICredentialsProvider.acquireCredentials(boolean)
to retrieve credentials.
public final String getUserId()
ICredentialsProvider
public final void repairCredentials(SystemMessage prompt) throws OperationCanceledException
ICredentialsProvider
prompt
- the message indicating the nature of the damage that must
be repaired. For example, indicating expiration of a password.
OperationCanceledException
- if the repair is cancelled for some reason. This could
include the inability of a credentials provider to open a dialog or a dialog being
cancelled.public final void setPassword(String password)
ICredentialsProvider
password
- the new value of the password in the credentials held by this providerpublic final void setPassword(String matchingUserId, String password, boolean persist)
matchingUserId
- the user for which to set the passwordpassword
- the password to set for this useridpersist
- true if the password is to be persisted as wellpublic final void setUserId(String newId)
ICredentialsProvider
newId
- the user id to place into the credentials held by this providerprotected ISystemPasswordPromptDialog getPasswordPromptDialog(Shell shell)
ISystemPasswordPromptDialog
protected ICredentialsValidator getSignonValidator()
|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |