Examples of LdapJndiProperties


Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

    {
        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
        env.put( Context.SECURITY_CREDENTIALS, "asdf" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.SIMPLE, props.getAuthenticationLevel() );
        assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( "asdf" ), props.getCredentials() ) );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

    public void testNoAuthWithNoCredsEnv() throws Exception
    {
        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.NONE, props.getAuthenticationLevel() );
        assertTrue( props.getCredentials() == null );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

    {
        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "" );
        env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5 CRAM-MD5" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.STRONG, props.getAuthenticationLevel() );
        assertTrue( props.getCredentials() == null );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "" );
        env.put( Context.SECURITY_CREDENTIALS, "asdf" );
        env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5 CRAM-MD5" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.STRONG, props.getAuthenticationLevel() );
        assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( "asdf" ), props.getCredentials() ) );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

    {
        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
        env.put( Context.SECURITY_CREDENTIALS, "asdf" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.SIMPLE, props.getAuthenticationLevel() );
        assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( "asdf" ), props.getCredentials() ) );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

    public void testNoAuthWithNoCredsEnv() throws Exception
    {
        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.NONE, props.getAuthenticationLevel() );
        assertTrue( props.getCredentials() == null );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

    {
        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "" );
        env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5 CRAM-MD5" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.STRONG, props.getAuthenticationLevel() );
        assertTrue( props.getCredentials() == null );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "" );
        env.put( Context.SECURITY_CREDENTIALS, "asdf" );
        env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5 CRAM-MD5" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.STRONG, props.getAuthenticationLevel() );
        assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( "asdf" ), props.getCredentials() ) );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

    {
        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
        env.put( Context.SECURITY_CREDENTIALS, "asdf" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.SIMPLE, props.getAuthenticationLevel() );
        assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( "asdf" ), props.getCredentials() ) );
    }
View Full Code Here

Examples of org.apache.directory.server.core.jndi.LdapJndiProperties

    public void testNoAuthWithNoCredsEnv() throws Exception
    {
        Hashtable<String,Object> env = new Hashtable<String,Object>();
        env.put( Context.SECURITY_PRINCIPAL, "" );
        env.put( Context.PROVIDER_URL, "" );
        LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
        assertEquals( AuthenticationLevel.NONE, props.getAuthenticationLevel() );
        assertTrue( props.getCredentials() == null );
    }
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.