Package org.nasutekds.messages

Examples of org.nasutekds.messages.Message


   */
  @Override()
  public ByteString getPlaintextValue(ByteSequence storedPassword)
         throws DirectoryException
  {
    Message message = ERR_PWSCHEME_NOT_REVERSIBLE.get(STORAGE_SCHEME_NAME_MD5);
    throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message);
  }
View Full Code Here


  @Override()
  public ByteString getAuthPasswordPlaintextValue(String authInfo,
                                                  String authValue)
         throws DirectoryException
  {
    Message message =
        ERR_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD.get(getStorageSchemeName());
    throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
  }
View Full Code Here

                                              ByteString value)
           throws DirectoryException
    {
      if (value != null)
      {
        Message message = ERR_ACCTUSABLEREQ_CONTROL_HAS_VALUE.get();
        throw new DirectoryException(ResultCode.PROTOCOL_ERROR, message);
      }


      return new AccountUsableRequestControl(isCritical);
View Full Code Here

          buffer.delete(pos, pos+1);
        }
        else
        {
          // This is an illegal character.  Either log it or reject it.
          Message message = WARN_ATTR_SYNTAX_NUMERIC_STRING_ILLEGAL_CHAR.get(
                  value.toString(), String.valueOf(c), pos);

          switch (DirectoryServer.getSyntaxEnforcementPolicy())
          {
            case REJECT:
View Full Code Here


  // Create the message.
  private static Message createMessage(AbstractManagedObjectDefinition<?, ?> d,
      Reason reason) {
    Message ufn = d.getUserFriendlyName();
    switch (reason) {
    case NO_TYPE_INFORMATION:
      return ERR_DECODING_EXCEPTION_NO_TYPE_INFO.get(ufn);
    case WRONG_TYPE_INFORMATION:
      return ERR_DECODING_EXCEPTION_WRONG_TYPE_INFO.get(ufn);
View Full Code Here

      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }

      Message message = ERR_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST.get(
          MESSAGE_DIGEST_ALGORITHM_SHA_512, String.valueOf(e));
      throw new InitializationException(message, e);
    }

    digestLock = new Object();
View Full Code Here

        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }

        Message message = ERR_PWSCHEME_CANNOT_ENCODE_PASSWORD.get(
            CLASS_NAME, getExceptionMessage(e));
        throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                     message, e);
      }
    }
View Full Code Here

      int colonPos = token.indexOf(':');
      if (colonPos < 0)
      {
        if (token.length() == 0)
        {
          Message message =
              INFO_SORTREQ_CONTROL_NO_ATTR_NAME.get(sortOrderString);
          throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, message);
        }

        if (reverseOrder)
        {
          decodedKeyList.add(new String[]{token, null, "r"});
        }
        else
        {
          decodedKeyList.add(new String[]{token, null, null});
        }
      }
      else if (colonPos == 0)
      {
        Message message =
            INFO_SORTREQ_CONTROL_NO_ATTR_NAME.get(sortOrderString);
        throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, message);
      }
      else if (colonPos == (token.length() - 1))
      {
        Message message =
            INFO_SORTREQ_CONTROL_NO_MATCHING_RULE.get(sortOrderString);
        throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, message);
      }
      else
      {
        String attrName = token.substring(0, colonPos);
        String ruleID   = token.substring(colonPos+1);

        if (reverseOrder)
        {
          decodedKeyList.add(new String[]{attrName, ruleID, "r"});
        }
        else
        {
          decodedKeyList.add(new String[]{attrName, ruleID, null});
        }
      }
    }

    if (decodedKeyList.isEmpty())
    {
      Message message = INFO_SORTREQ_CONTROL_NO_SORT_KEYS.get();
      throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, message);
    }
  }
View Full Code Here

        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }

        Message message = ERR_PWSCHEME_CANNOT_ENCODE_PASSWORD.get(
            CLASS_NAME, getExceptionMessage(e));
        throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                     message, e);
      }
    }
View Full Code Here

      byte[] decodedBytes = Base64.decode(storedPassword.toString());

      saltLength = decodedBytes.length - SHA512_LENGTH;
      if (saltLength <= 0)
      {
        Message message =
          ERR_PWSCHEME_INVALID_BASE64_DECODED_STORED_PASSWORD.get(
          storedPassword.toString());
        ErrorLogger.logError(message);
        return false;
      }
      saltBytes = new byte[saltLength];
      System.arraycopy(decodedBytes, 0, digestBytes, 0, SHA512_LENGTH);
      System.arraycopy(decodedBytes, SHA512_LENGTH, saltBytes, 0,
                       saltLength);
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }

      Message message = ERR_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD.get(
          storedPassword.toString(), String.valueOf(e));
      ErrorLogger.logError(message);
      return false;
    }
View Full Code Here

TOP

Related Classes of org.nasutekds.messages.Message

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.