Package org.apache.directory.api.ldap.extras.extended

Examples of org.apache.directory.api.ldap.extras.extended.PwdModifyRequest


    public Asn1Object decode( byte[] stream ) throws DecoderException
    {
        ByteBuffer bb = ByteBuffer.wrap( stream );
        PasswordModifyRequestContainer container = new PasswordModifyRequestContainer();
        decoder.decode( bb, container );
        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();

        // Clean the container for the next decoding
        container.clean();

        return ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest();
View Full Code Here


        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNull( pwdModifyRequest.getUserIdentity() );
        assertNotNull( pwdModifyRequest.getOldPassword() );
        assertEquals( "abcd", Strings.utf8ToString( pwdModifyRequest.getOldPassword() ) );
        assertNull( pwdModifyRequest.getNewPassword() );

        // Check the length
        assertEquals( 0x08, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNull( pwdModifyRequest.getUserIdentity() );
        assertNotNull( pwdModifyRequest.getOldPassword() );
        assertEquals( "abcd", Strings.utf8ToString( pwdModifyRequest.getOldPassword() ) );
        assertNotNull( pwdModifyRequest.getNewPassword() );
        assertEquals( 0, pwdModifyRequest.getNewPassword().length );

        // Check the length
        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNull( pwdModifyRequest.getUserIdentity() );
        assertNotNull( pwdModifyRequest.getOldPassword() );
        assertEquals( "abcd", Strings.utf8ToString( pwdModifyRequest.getOldPassword() ) );
        assertNotNull( pwdModifyRequest.getNewPassword() );
        assertEquals( "efgh", Strings.utf8ToString( pwdModifyRequest.getNewPassword() ) );

        // Check the length
        assertEquals( 0x0E, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNull( pwdModifyRequest.getUserIdentity() );
        assertNull( pwdModifyRequest.getOldPassword() );
        assertNull( pwdModifyRequest.getNewPassword() );

        // Check the length
        assertEquals( 0x02, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNotNull( pwdModifyRequest.getUserIdentity() );
        assertEquals( 0, pwdModifyRequest.getUserIdentity().length );
        assertNull( pwdModifyRequest.getOldPassword() );
        assertNull( pwdModifyRequest.getNewPassword() );

        // Check the length
        assertEquals( 0x04, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNotNull( pwdModifyRequest.getUserIdentity() );
        assertEquals( "abcd", Strings.utf8ToString( pwdModifyRequest.getUserIdentity() ) );
        assertNull( pwdModifyRequest.getOldPassword() );
        assertNull( pwdModifyRequest.getNewPassword() );

        // Check the length
        assertEquals( 0x08, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNotNull( pwdModifyRequest.getUserIdentity() );
        assertEquals( "abcd", Strings.utf8ToString( pwdModifyRequest.getUserIdentity() ) );
        assertNull( pwdModifyRequest.getOldPassword() );
        assertNotNull( pwdModifyRequest.getNewPassword() );
        assertEquals( 0, pwdModifyRequest.getNewPassword().length );

        // Check the length
        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNotNull( pwdModifyRequest.getUserIdentity() );
        assertEquals( "abcd", Strings.utf8ToString( pwdModifyRequest.getUserIdentity() ) );
        assertNull( pwdModifyRequest.getOldPassword() );
        assertNotNull( pwdModifyRequest.getNewPassword() );
        assertEquals( "efgh", Strings.utf8ToString( pwdModifyRequest.getNewPassword() ) );

        // Check the length
        assertEquals( 0x0E, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

        {
            de.printStackTrace();
            fail( de.getMessage() );
        }

        PwdModifyRequest pwdModifyRequest = container.getPwdModifyRequest();
        assertNotNull( pwdModifyRequest.getUserIdentity() );
        assertEquals( "abcd", Strings.utf8ToString( pwdModifyRequest.getUserIdentity() ) );
        assertNotNull( pwdModifyRequest.getOldPassword() );
        assertEquals( 0, pwdModifyRequest.getOldPassword().length );
        assertNull( pwdModifyRequest.getNewPassword() );

        // Check the length
        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).getPasswordModifyRequest()
            .computeLength() );
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.extras.extended.PwdModifyRequest

Copyright © 2018 www.massapicom. 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.