Examples of IAuthHandler


Examples of org.apache.directory.ldapstudio.browser.core.model.IAuthHandler

        {
            try
            {
                monitor.reportProgress( BrowserCoreMessages.model__binding );

                IAuthHandler authHandler = BrowserCorePlugin.getDefault().getAuthHandler();
                if ( authHandler == null )
                {
                    throw new ConnectionException( BrowserCoreMessages.model__no_auth_handler );
                }

                ICredentials credentials = authHandler.getCredentials( this.connectionParameter );
                if ( credentials == null )
                {
                    throw new ConnectionException( BrowserCoreMessages.model__no_credentials );
                }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.IAuthHandler

        {
            try
            {
                monitor.reportProgress( BrowserCoreMessages.model__binding );

                IAuthHandler authHandler = BrowserCorePlugin.getDefault().getAuthHandler();
                if ( authHandler == null )
                {
                    throw new ConnectionException( BrowserCoreMessages.model__no_auth_handler );
                }

                ICredentials credentials = authHandler.getCredentials( this.connectionParameter );
                if ( credentials == null )
                {
                    throw new ConnectionException( BrowserCoreMessages.model__no_credentials );
                }
View Full Code Here

Examples of org.apache.directory.studio.connection.core.IAuthHandler

            {
                authMethod = AUTHMETHOD_GSSAPI;
            }

            // setup credentials
            IAuthHandler authHandler = ConnectionCorePlugin.getDefault().getAuthHandler();
            if ( authHandler == null )
            {
                NamingException namingException = new NamingException( Messages.model__no_auth_handler );
                monitor.reportError( Messages.model__no_auth_handler, namingException );
                throw namingException;
            }
            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
            if ( credentials == null )
            {
                CancelException cancelException = new CancelException();
                monitor.setCanceled( true );
                monitor.reportError( Messages.model__no_credentials, cancelException );
View Full Code Here

Examples of org.apache.directory.studio.connection.core.IAuthHandler

            {
                authMethod = "GSSAPI";
            }

            // setup credentials
            IAuthHandler authHandler = ConnectionCorePlugin.getDefault().getAuthHandler();
            if ( authHandler == null )
            {
                monitor.reportError( Messages.model__no_auth_handler, new Exception() );
            }
            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
            if ( credentials == null )
            {
                monitor.setCanceled( true );
                monitor.reportError( Messages.model__no_credentials, new CancelException() );
                throw new CancelException();
View Full Code Here

Examples of org.apache.directory.studio.connection.core.IAuthHandler

            {
                authMethod = "GSSAPI";
            }

            // setup credentials
            IAuthHandler authHandler = ConnectionCorePlugin.getDefault().getAuthHandler();
            if ( authHandler == null )
            {
                monitor.reportError( Messages.model__no_auth_handler, new Exception() );
            }
            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
            if ( credentials == null )
            {
                monitor.setCanceled( true );
                monitor.reportError( Messages.model__no_credentials, new CancelException() );
                throw new CancelException();
View Full Code Here

Examples of org.apache.directory.studio.connection.core.IAuthHandler

            {
                authMethod = "GSSAPI";
            }

            // setup credentials
            IAuthHandler authHandler = ConnectionCorePlugin.getDefault().getAuthHandler();
            if ( authHandler == null )
            {
                NamingException namingException = new NamingExceptionMessages.model__no_auth_handler );
                monitor.reportError( Messages.model__no_auth_handler, namingException );
                throw namingException;
            }
            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
            if ( credentials == null )
            {
                CancelException cancelException = new CancelException();
                monitor.setCanceled( true );
                monitor.reportError( Messages.model__no_credentials, cancelException );
View Full Code Here

Examples of org.apache.directory.studio.connection.core.IAuthHandler

        StudioProgressMonitor monitor = getProgressMonitor();
        ConnectionParameter connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getIpPort(),
            EncryptionMethod.NONE, AuthenticationMethod.SIMPLE, "uid=admin,ou=system", "secret", null, true, null );
        Connection connection = new Connection( connectionParameter );
        JNDIConnectionWrapper connectionWrapper = connection.getJNDIConnectionWrapper();
        IAuthHandler authHandler = getAuthHandler();
        ConnectionCorePlugin.getDefault().setAuthHandler( authHandler );

        assertFalse( connectionWrapper.isConnected() );

        connectionWrapper.connect( monitor );
View Full Code Here

Examples of org.apache.directory.studio.connection.core.IAuthHandler

    }


    private IAuthHandler getAuthHandler()
    {
        IAuthHandler authHandler = new IAuthHandler()
        {
            public ICredentials getCredentials( ConnectionParameter connectionParameter )
            {
                return new Credentials( connectionParameter.getBindPrincipal(), connectionParameter.getBindPassword(),
                    connectionParameter );
View Full Code Here

Examples of org.apache.directory.studio.connection.core.IAuthHandler

            {
                authMethod = "CRAM-MD5";
            }

            // setup credentials
            IAuthHandler authHandler = ConnectionCorePlugin.getDefault().getAuthHandler();
            if ( authHandler == null )
            {
                monitor.reportError( Messages.model__no_auth_handler, new Exception() );
            }
            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
            if ( credentials == null )
            {
                monitor.reportError( Messages.model__no_credentials, new Exception() );
            }
            bindPrincipal = credentials.getBindPrincipal();
View Full Code Here

Examples of org.apache.directory.studio.connection.core.IAuthHandler

            {
                authMethod = "CRAM-MD5";
            }

            // setup credentials
            IAuthHandler authHandler = ConnectionCorePlugin.getDefault().getAuthHandler();
            if ( authHandler == null )
            {
                monitor.reportError( Messages.model__no_auth_handler, new Exception() );
            }
            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
            if ( credentials == null )
            {
                monitor.reportError( Messages.model__no_credentials, new Exception() );
            }
            bindPrincipal = credentials.getBindPrincipal();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.