Package org.apache.directory.api.ldap.extras.controls.ppolicy

Examples of org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyImpl


            addUser( adminConnection, "UserXY", "secret3" );
            Dn userDn = new Dn( "cn=UserXY,ou=system" );

            userConnection = getNetworkConnectionAs( ldapServer, userDn.toString(), "secret3" );
            PasswordPolicyDecorator passwordPolicyRequestControl =
                new PasswordPolicyDecorator( LdapApiServiceFactory.getSingleton(), new PasswordPolicyImpl() );
            PasswordModifyRequest selfPwdModifyRequest = new PasswordModifyRequestImpl();
            selfPwdModifyRequest.setUserIdentity( Dn.getBytes( userDn ) );
            selfPwdModifyRequest.setOldPassword( Strings.getBytesUtf8( "secret3" ) );
            selfPwdModifyRequest.setNewPassword( Strings.getBytesUtf8( "1234567" ) );
            selfPwdModifyRequest.addControl( passwordPolicyRequestControl );
View Full Code Here


            adminConnection.modify( modifyRequest );

            BindRequest bindReq2 = new BindRequestImpl();
            bindReq2.setDn( userDn );
            bindReq2.setCredentials( "12345" );
            bindReq2.addControl( new PasswordPolicyImpl() );
            bindResponse = userConnection.bind( bindReq2 );
            respCtrl = getPwdRespCtrl( bindResponse );
            assertNotNull( respCtrl );
            assertNotNull( respCtrl.getResponse() );
            assertTrue( respCtrl.getResponse().getTimeBeforeExpiration() > 0 );
View Full Code Here

            case PASSWORD_POLICY_REQUEST_CONTROL:
                if ( isRequest )
                {
                    control = new PasswordPolicyDecorator( getDirectoryService().getLdapCodecService(),
                        new PasswordPolicyImpl() );
                }
                else
                {
                    control = new PasswordPolicyDecorator( getDirectoryService().getLdapCodecService(),
                        new PasswordPolicyImpl( new PasswordPolicyResponseImpl() ) );
                }

                break;

            case PERSISTENT_SEARCH_CONTROL:
View Full Code Here

    private int graceAuthNsRemainingTagLength;


    public PasswordPolicyDecorator( LdapApiService codec )
    {
        super( codec, new PasswordPolicyImpl() );
    }
View Full Code Here

    }


    public PasswordPolicyDecorator( LdapApiService codec, boolean hasResponse )
    {
        super( codec, new PasswordPolicyImpl( hasResponse ) );
    }
View Full Code Here


    public PasswordPolicyContainer( LdapApiService codec )
    {
        super();
        control = new PasswordPolicyDecorator( codec, new PasswordPolicyImpl() );
        stateStack = new int[1];
        grammar = PasswordPolicyGrammar.getInstance();
        setTransition( PasswordPolicyStates.START_STATE );
    }
View Full Code Here

            case PASSWORD_POLICY_REQUEST_CONTROL:
                if ( isRequest )
                {
                    control = new PasswordPolicyDecorator( getDirectoryService().getLdapCodecService(),
                        new PasswordPolicyImpl() );
                }
                else
                {
                    control = new PasswordPolicyDecorator( getDirectoryService().getLdapCodecService(),
                        new PasswordPolicyImpl( new PasswordPolicyResponseImpl() ) );
                }

                break;

            case PERSISTENT_SEARCH_CONTROL:
View Full Code Here

    private int graceAuthNsRemainingValueLength;


    public PasswordPolicyDecorator( LdapApiService codec )
    {
        super( codec, new PasswordPolicyImpl() );
    }
View Full Code Here

    }


    public PasswordPolicyDecorator( LdapApiService codec, boolean hasResponse )
    {
        super( codec, new PasswordPolicyImpl( hasResponse ) );
    }
View Full Code Here


    public PasswordPolicyContainer( LdapApiService codec )
    {
        super();
        control = new PasswordPolicyDecorator( codec, new PasswordPolicyImpl() );
        grammar = PasswordPolicyGrammar.getInstance();
        setTransition( PasswordPolicyStates.START_STATE );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyImpl

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.