Examples of PasswordException


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

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

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

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

     * @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

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

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

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

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

                }
                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

Examples of org.openqreg.exception.PasswordException

      FileOutputStream fos = new FileOutputStream(keyPath);
      ks.store(fos, keyStorePassword.toCharArray());

      fos.close();
    } catch (Exception e) {
      throw new PasswordException("Can't store key because of:\n"
          + e.toString());
    }

  }
View Full Code Here

Examples of org.openqreg.exception.PasswordException

      FileInputStream fis = new FileInputStream(keyPath);
      ks.load(fis, keyStorePassword.toCharArray());
      key = ks.getKey(KeyAlias, keyPassword.toCharArray());
      fis.close();
    } catch (Exception e) {
      throw new PasswordException("Can't load key because of:\n" + e.toString());
    }
  }
View Full Code Here

Examples of org.openqreg.exception.PasswordException

   */
  public void generateKey() throws PasswordException {
    try {
      storedKey = kg.generateKey();
    } catch (Exception e) {
      throw new PasswordException("Can't generate key because of:\n"
          + e.toString());
    }
  }
View Full Code Here

Examples of org.openqreg.exception.PasswordException

      kg = KeyGenerator.getInstance("DES", "SunJCE");
      kg.init(keyLength);
      cipher = Cipher.getInstance(encryption);
      initiated = true;
    } catch (Exception e) {
      throw new PasswordException(
          "Can't initiate PasswordHandler because of:\n" + e.toString());
    }
  }
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.