Package org.apache.directory.server.config.beans

Examples of org.apache.directory.server.config.beans.InterceptorBean


     * Disables the hashing password interceptor.
     */
    private void disableHashingPasswordInterceptor()
    {
        // Getting the hashing password interceptor
        InterceptorBean hashingPasswordInterceptor = getHashingPasswordInterceptor();

        if ( hashingPasswordInterceptor != null )
        {
            // Disabling the interceptor
            hashingPasswordInterceptor.setEnabled( false );
        }
    }
View Full Code Here


     * Updates the hashing method.
     */
    private void updateHashingMethod()
    {
        // Getting the hashing password interceptor
        InterceptorBean hashingPasswordInterceptor = getHashingPasswordInterceptor();

        if ( hashingPasswordInterceptor != null )
        {
            // Updating the hashing method
            hashingPasswordInterceptor.setInterceptorClassName( getFqcnForHashingMethod( getSelectedHashingMethod() ) );
        }
    }
View Full Code Here

    {
        // Enabling the KDC Server
        getKdcServerBean( directoryServiceBean ).setEnabled( enableKerberosServer );

        // Getting the Key Derivation Interceptor
        InterceptorBean keyDerivationInterceptor = getKeyDerivationInterceptor( directoryServiceBean );

        if ( keyDerivationInterceptor != null )
        {
            // Enabling the Key Derivation Interceptor
            keyDerivationInterceptor.setEnabled( enableKerberosServer );
        }
    }
View Full Code Here

        // Enable TLS Checkbox
        setSelection( enableTlsCheckbox, getTlsExtendedOpHandlerBean().isEnabled() );

        // Hashing Method widgets
        InterceptorBean hashingMethodInterceptor = getHashingMethodInterceptor();
        if ( hashingMethodInterceptor == null )
        {
            // No hashing method interceptor
            setSelection( enableServerSidePasswordHashingCheckbox, false );
            setEnabled( hashingMethodComboViewer.getCombo(), enableServerSidePasswordHashingCheckbox.getSelection() );
            setSelection( hashingMethodComboViewer, LdapSecurityConstants.HASH_METHOD_SSHA );
        }
        else
        {
            LdapSecurityConstants hashingMethod = getHashingMethodFromInterceptor( hashingMethodInterceptor );
            if ( hashingMethod != null )
            {
                // Setting selection for the hashing method
                setSelection( enableServerSidePasswordHashingCheckbox, hashingMethodInterceptor.isEnabled() );
                setEnabled( hashingMethodComboViewer.getCombo(), enableServerSidePasswordHashingCheckbox.getSelection() );
                setSelection( hashingMethodComboViewer, hashingMethod );
            }
            else
            {
View Full Code Here

     * @param hashingMethod the hashing method
     * @return the corresponding hashing method interceptor
     */
    private InterceptorBean createHashingMethodInterceptor( LdapSecurityConstants hashingMethod )
    {
        InterceptorBean hashingMethodInterceptor = new InterceptorBean();

        switch ( hashingMethod )
        {
            case HASH_METHOD_SHA:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SHA );
                break;
            case HASH_METHOD_SSHA:
            default:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SSHA );
                break;
            case HASH_METHOD_MD5:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_MD5 );
                break;
            case HASH_METHOD_SMD5:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SMD5 );
                break;
            case HASH_METHOD_CRYPT:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_CRYPT );
                break;
            case HASH_METHOD_SHA256:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SHA256 );
                break;
            case HASH_METHOD_SSHA256:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SSHA256 );
                break;
            case HASH_METHOD_SHA384:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SHA384 );
                break;
            case HASH_METHOD_SSHA384:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SSHA384 );
                break;
            case HASH_METHOD_SHA512:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SHA512 );
                break;
            case HASH_METHOD_SSHA512:
                hashingMethodInterceptor.setInterceptorClassName( FQCN_HASHING_INTERCEPTOR_SSHA512 );
                break;
        }

        hashingMethodInterceptor.setInterceptorId( getHashingMethodInterceptorId( hashingMethodInterceptor
            .getInterceptorClassName() ) );
        hashingMethodInterceptor.setEnabled( true );

        return hashingMethodInterceptor;
    }
View Full Code Here

        {
            LdapSecurityConstants hashingMethod = ( LdapSecurityConstants ) selection.getFirstElement();
            if ( hashingMethod != null )
            {
                // Creating the hashing method interceptor
                InterceptorBean hashingMethodInterceptor = createHashingMethodInterceptor( hashingMethod );

                // Getting the order of the authentication interceptor
                int authenticationInterceptorOrder = getAuthenticationInterceptorOrder();

                // Assigning the order of the hashing method interceptor
                // It's order is: authenticationInterceptorOrder + 1
                hashingMethodInterceptor.setInterceptorOrder( authenticationInterceptorOrder + 1 );

                // Getting the interceptors list
                List<InterceptorBean> interceptors = getDirectoryServiceBean().getInterceptors();

                // Updating the order of the interceptors after the authentication interceptor
View Full Code Here

     * Deletes the hashing method interceptor.
     */
    private void deleteHashingMethodInterceptor()
    {
        // Getting the hashing method interceptor
        InterceptorBean hashingMethodInterceptor = getHashingMethodInterceptor();

        if ( hashingMethodInterceptor != null )
        {
            // Getting the order of the hashing method interceptor
            int hashingMethodInterceptorOrder = hashingMethodInterceptor.getInterceptorOrder();

            // Getting the interceptors list
            List<InterceptorBean> interceptors = getDirectoryServiceBean().getInterceptors();

            // Updating the order of the interceptors after the hashing method interceptor
View Full Code Here

TOP

Related Classes of org.apache.directory.server.config.beans.InterceptorBean

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.