code: private Credentials<UserPasswordToken> splitCredentials(final String credentials) {
      final String[] splitCredentials = credentials.split(":");
      if (splitCredentials.length != 2) {
        logger.error("Error splitting credentials {}", credentials);
        return null;
      } else {
        final UserPasswordToken userPassTuple = new UserPasswordToken(splitCredentials[0],
                                                                              splitCredentials[1].toCharArray());
        return new HttpBasicCredentials(userPassTuple);
      }
    }
docs: Splits a string in the form "username:password" into the UsernamePasswordTuple