drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/PlatformUtils.java
public AuthPromptResults promptForAuthentication(final String server) {

        Display display = PlatformUI.getWorkbench().getDisplay();
        AuthPromptRunnable op = new AuthPromptRunnable(server);
        display.syncExec(op);
        return op.getResults();
    }
public AuthPromptResults promptForAuthentication(final String server) {

        Display display = PlatformUI.getWorkbench().getDisplay();
        AuthPromptRunnable op = new AuthPromptRunnable(server);
        display.syncExec(op);
        return op.getResults();
    }
public AuthPromptResults promptForAuthentication ( final String server ) { Display display = PlatformUI . getWorkbench ( ) . getDisplay ( ) ; AuthPromptRunnable op = new AuthPromptRunnable ( server ) ; display . syncExec ( op ) ; return op . getResults ( ) ; }
Prompts for user name and password for a given Guvnor repository.
@param server The repository for log in
@return The dialog results. Includes whether the user decided to save
the user name and password in the platform's key ring.
Null if the user cancels the dialog.
Prompts for user name and password for a given Guvnor repository .