Package org.apache.directory.ldap.client.template.exception

Examples of org.apache.directory.ldap.client.template.exception.PasswordException


    @Override
    public PasswordWarning authenticate( SearchRequest searchRequest, char[] password ) throws PasswordException
    {
        Dn userDn = searchFirst( searchRequest, dnEntryMapper );
        if ( userDn == null ) {
            throw new PasswordException().setResultCode( ResultCodeEnum.INVALID_CREDENTIALS );
        }
       
        return authenticate( userDn, password );
    }
View Full Code Here


     * @param e
     * @return
     */
    protected PasswordException exception( LdapException e )
    {
        return new PasswordException().setLdapException( e );
    }
View Full Code Here

     * @return
     */
    protected PasswordException fail( ResultResponse resultResponse,
            PasswordPolicy passwordPolicy, ResultCodeEnum resultCode )
    {
        PasswordException exception = new PasswordException();
        exception.setResultCode( resultCode );
        if ( passwordPolicy != null
            && passwordPolicy.getResponse() != null
            && passwordPolicy.getResponse().getPasswordPolicyError() != null )
        {
            exception.setPasswordPolicyError( passwordPolicy.getResponse().getPasswordPolicyError() );
        }
        return exception;
    }
View Full Code Here

                throw fail( response, passwordPolicy, resultCode );
            }
        }
        catch ( LdapException e )
        {
            throw new PasswordException().setLdapException( e );
        }
    }
View Full Code Here

    @Override
    public PasswordWarning authenticate( SearchRequest searchRequest, char[] password ) throws PasswordException
    {
        Dn userDn = searchFirst( searchRequest, dnEntryMapper );
        if ( userDn == null ) {
            throw new PasswordException().setResultCode( ResultCodeEnum.INVALID_CREDENTIALS );
        }
       
        return authenticate( userDn, password );
    }
View Full Code Here

                }
                return null;
            }
            else
            {
                PasswordException exception = new PasswordException();
                exception.setResultCode( resultCode );
                if ( passwordPolicy != null
                    && passwordPolicy.getResponse() != null
                    && passwordPolicy.getResponse().getPasswordPolicyError() != null )
                {
                    exception.setPasswordPolicyError( passwordPolicy.getResponse().getPasswordPolicyError() );
                }
                throw exception;
            }
        }
        catch ( LdapException e )
        {
            throw new PasswordException().setLdapException( e );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.ldap.client.template.exception.PasswordException

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.