Package org.corrib.treemaps.source

Examples of org.corrib.treemaps.source.BadCredentialsException


   * @throws BadCredentialsException
   */
  public void storeCredentials(String sscfPerson,BookmarkingSource bookmarkingSource,String login, String password) throws BadCredentialsException{
    if(login == null || "".equals(login) ||
        password == null || "".equals(password))
      throw new BadCredentialsException("Invalid login/password");
    Person person = PersonFactory.getPerson(sscfPerson);
    if(person != null){
      String mbox_sha1sum = person.getMbox_sha1sum();
      PBEKeySpec keySpec = new PBEKeySpec(mbox_sha1sum.toCharArray());
      String[] encryptedCredentials = encryptCredentials(login, password, keySpec);
View Full Code Here


   */
  public void storeCredentials(String sscfPerson,BookmarkingSource bookmarkingSource, TaggingCredential credentials) throws BadCredentialsException{
   
    if(credentials.getLogin() == null || credentials.getPassword() == null || "".equals(credentials.getLogin()) ||
         "".equals(credentials.getPassword())){
      throw new BadCredentialsException("Invalid login/password");
    }
   
    Person person  = PersonFactory.getPerson(sscfPerson);
    if(person != null){
      String mbox_sha1sum = person.getMbox_sha1sum();
View Full Code Here

       
        addToMap(sscfPerson,credentials);
        return credentials;
      } catch (InvalidKeySpecException e) {
        logger.severe(e.getMessage());
        throw new BadCredentialsException(e);
      } catch (InvalidKeyException e) {
        logger.severe(e.getMessage());
        throw new BadCredentialsException(e);
      } catch (InvalidAlgorithmParameterException e) {
        logger.severe(e.getMessage());
        throw new BadCredentialsException(e);
      } catch (IllegalBlockSizeException e) {
        logger.severe(e.getMessage());
        throw new BadCredentialsException(e);
      } catch (BadPaddingException e) {
        logger.severe(e.getMessage());
        throw new BadCredentialsException(e);
      } catch (UnsupportedEncodingException e) {
        logger.severe(e.getMessage());
        throw new BadCredentialsException();
      } catch (IOException e) {
        logger.severe(e.getMessage());
        throw new BadCredentialsException(e);
      }

    }
    throw new BadCredentialsException();
  }
View Full Code Here

TOP

Related Classes of org.corrib.treemaps.source.BadCredentialsException

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.