Search in sources :

Example 1 with AuthProvider

use of org.pentaho.di.ui.core.auth.model.AuthProvider in project pentaho-kettle by pentaho.

the class AuthProviderController method setNewOverlay.

public void setNewOverlay(AuthProvider provider) throws XulException {
    if (provider == null) {
        provider = new NoAuthAuthProvider(bf);
    }
    if (this.activeProvider != null) {
        getXulDomContainer().removeOverlay(activeProvider.getOverlay());
    }
    getXulDomContainer().loadOverlay(provider.getOverlay());
    if (model.getSelectedItem() != null) {
        AuthProvider current = (AuthProvider) model.getSelectedItem().getItem();
        if (current.getOverlay().equalsIgnoreCase(provider.getOverlay())) {
            try {
                current.bind();
            } catch (Exception e) {
                log.logError(resourceBundle.getString("error.on_bind"), e);
            }
        }
    }
    this.activeProvider = provider;
}
Also used : NoAuthAuthProvider(org.pentaho.di.ui.core.auth.model.NoAuthAuthProvider) KerberosAuthProvider(org.pentaho.di.ui.core.auth.model.KerberosAuthProvider) AuthProvider(org.pentaho.di.ui.core.auth.model.AuthProvider) NoAuthAuthProvider(org.pentaho.di.ui.core.auth.model.NoAuthAuthProvider) BasicAuthProvider(org.pentaho.di.ui.core.auth.model.BasicAuthProvider) XulException(org.pentaho.ui.xul.XulException) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Example 2 with AuthProvider

use of org.pentaho.di.ui.core.auth.model.AuthProvider in project pentaho-kettle by pentaho.

the class AuthProviderController method getPossibleTypes.

/**
 * This will change to pull providers from the auth persistencemanager
 *
 * @return Collection<AuthProvider>
 */
public Collection<AuthProvider> getPossibleTypes() {
    ArrayList<AuthProvider> types = new ArrayList<AuthProvider>();
    types.add(new NoAuthAuthProvider(bf));
    types.add(new KerberosAuthProvider(bf));
    types.add(new BasicAuthProvider(bf));
    return types;
}
Also used : BasicAuthProvider(org.pentaho.di.ui.core.auth.model.BasicAuthProvider) ArrayList(java.util.ArrayList) KerberosAuthProvider(org.pentaho.di.ui.core.auth.model.KerberosAuthProvider) AuthProvider(org.pentaho.di.ui.core.auth.model.AuthProvider) NoAuthAuthProvider(org.pentaho.di.ui.core.auth.model.NoAuthAuthProvider) BasicAuthProvider(org.pentaho.di.ui.core.auth.model.BasicAuthProvider) NoAuthAuthProvider(org.pentaho.di.ui.core.auth.model.NoAuthAuthProvider) KerberosAuthProvider(org.pentaho.di.ui.core.auth.model.KerberosAuthProvider)

Aggregations

AuthProvider (org.pentaho.di.ui.core.auth.model.AuthProvider)2 BasicAuthProvider (org.pentaho.di.ui.core.auth.model.BasicAuthProvider)2 KerberosAuthProvider (org.pentaho.di.ui.core.auth.model.KerberosAuthProvider)2 NoAuthAuthProvider (org.pentaho.di.ui.core.auth.model.NoAuthAuthProvider)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 ArrayList (java.util.ArrayList)1 XulException (org.pentaho.ui.xul.XulException)1