Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.core.subsystems
Interface ICredentialsProvider

All Known Implementing Classes:
AbstractCredentialsProvider, StandardCredentialsProvider

public interface ICredentialsProvider

A credentials provider provides credentials to a connector service. Every authenticating connector service has its own credentials provider, usually created when that connector service is created.

Credentials will usually consist of a user id and password but may be something else in which case implementers are free change the user id and password methods to something that makes sense for their case.

A provider may be in a suppressed state, in which case it will prohibit the acquisition of credentials.

See Also:
ICredentials, IConnectorService, AuthenticatingConnectorService

Method Summary
 void acquireCredentials (boolean reacquire)
          Causes the provider to create a set of credentials for use by a connector service in order to connect to a target host system.
 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.
  IConnectorService getConnectorService ()
          Retrieves the connector service associated with this provider.
  ICredentials getCredentials ()
          Retrieves the credentials known to this credentials provider.
  String getUserId ()
          If the credentials include a user id then retrieve that user id.
 boolean isSuppressed ()
          Retrieves the suppression state of the provider.
 void repairCredentials ( SystemMessage message)
          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 setSuppressed (boolean suppressed)
          Sets the suppressed state of the provider.
 void setUserId ( String userId)
          If the credentials include a user id then set that user id to the new value.
 

Method Detail

acquireCredentials

void acquireCredentials(boolean reacquire)
                        throws 
OperationCanceledException
Causes the provider to create a set of credentials for use by a connector service in order to connect to a target host system. This may be done by presenting a dialog or by retrieving remembered values.

Parameters:
reacquire - true if the provider should refresh any remembered credentials. Typically used to force the showing of a dialog containing remembered credentials.
Throws:
OperationCanceledException - if the acquisition of credentials is cancelled by the user, if the provider is in suppressed state, a resource (such as the workbench) not being available, or interrupted by some other means.
Since:
3.0 throws OperationCanceledException instead of InterruptedException

repairCredentials

void repairCredentials(
SystemMessage message)
                       throws 
OperationCanceledException
The connector service using this provider may find the credentials provided are incorrector or expired. This method asks the provider to repair those credentials. This would typically be used to present a dialog asking for the reentry of an expired password.

Parameters:
message - the message indicating the nature of the damage that must be repaired. For example, indicating expiration of a password.
Throws:
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.
Since:
3.0 throws OperationCanceledException instead of InterruptedException

clearCredentials

void clearCredentials()
Clears the credentials known by this credentials provider. This will cause a reacquistion of all compoenents of the credentials at the next acquire. If credentials consist of a user id and password then both of those are cleared. Does not clear any persistently remembered values.


getCredentials


ICredentials getCredentials()
Retrieves the credentials known to this credentials provider. Does not cause the credentials to be acquired. May be used after acquireCredentials(boolean) to retrieve credentials.

Returns:
the credentials that have previously been acquired or repaired. May be null if no credentials have yet been acquired.

clearPassword

void clearPassword()
If the credentials include a password or equivalent then clears only that that portion of the credentials. If the credentials do not include a password then the implementation may somehow invalidate the credentials so that they will be reacquired at the next acquisition.


setPassword

void setPassword(
String password)
If the credentials include a password or equivalent then set that password to the new value. If the credentials do not include a password then the implementation may ignore this.

Parameters:
password - the new value of the password in the credentials held by this provider

setUserId

void setUserId(
String userId)
If the credentials include a user id then set that user id to the new value. If the credentials do not include a user id then this is implementation defined.

Parameters:
userId - the user id to place into the credentials held by this provider

getUserId


String getUserId()
If the credentials include a user id then retrieve that user id. If the credentials do not currently contain a user id then a default user id related to the connector service may be obtained. If the credentials do not support a user id then this should return null.

Returns:
the userid of the credentials held by this provider

isSuppressed

boolean isSuppressed()
Retrieves the suppression state of the provider. Acquisition may be suppressed for a period of time after a previous attempt. This is to provide client control of the acquisition policy. If true then acquireCredentials(boolean) will immediately cancel when invoked.

Returns:
true if the provider is suppressed.

setSuppressed

void setSuppressed(boolean suppressed)
Sets the suppressed state of the provider. Acquisition may be suppressed for a period of time after a previous attempt. This is to provide client control of the acquisition policy. If true then acquireCredentials(boolean) will immediately cancel when invoked.

Parameters:
suppressed - true if the provider is to be suppressed.

getConnectorService


IConnectorService getConnectorService()
Retrieves the connector service associated with this provider. Each provider has its own connector service. All authenticating connector services have their own provider.

Returns:
the connector service associated with this provider

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire