Bug 183771 - [components][api] StandardCredentialProvider should not require UI if password is stored
Summary: [components][api] StandardCredentialProvider should not require UI if passwor...
Status: ASSIGNED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: David Dykstal CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks: 198790
  Show dependency tree
 
Reported: 2007-04-24 08:00 EDT by Martin Oberhuber CLA
Modified: 2009-12-09 07:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-04-24 08:00:36 EDT
When a ConnectorService uses the StandardCredentialProvider, and connect() is called with forcePrompt==false, there is no need to pop up a UI in case a password has been stored.

In this case, the StandardCredentialProvider should work completely without ANY UI requirements, in order to make it possible to work in headless applications.

I believe that this can be achieved by defining the StandardCredentialProvider in a non-UI plugin, defining an ICredentialPrompter interface in non-UI as well, and implementing StandardCredentialPrompter in UI. The StandardCredentialProvider should delegate to the prompter and instanciate it ONLY if either
   * forcePrompt==true, or
   * a password has not been saved, or
   * an error occurs with the saved password.
If the StandardCredentialPrompter instance has not yet been created by the UI, it is OK to return an error (i.e. headless applications are unable to log in if no password has been saved and no prompter has been set).

applications should be able to set the prompter in the credential provider, or in the connector service.
Comment 1 David Dykstal CLA 2007-05-16 17:01:17 EDT
The StandardCredentialsProvider is a prompting provider. If an alternative mechanism is needed it can be done by subclassing AuthenticatingCredentialsProvider for now.

Deferring to future and leaving as an enhancement.
Comment 2 David Dykstal CLA 2008-05-29 17:25:42 EDT
Moving enhancements to the 3.1 release.