Commit 31358848 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Add restricted access documentation

parent 284c23d3
......@@ -157,7 +157,8 @@ def network_download(net, filename):
if entry.restricted:
token = request.headers.get("WWW-Authenticate", "")
token = token.replace("Authorization: Bearer", "").strip()
token = token.replace("Authorization:", "").strip()
token = token.replace("Bearer", "").strip()
if token not in access_tokens:
if filename.split(".")[0] ==
......@@ -310,6 +311,10 @@ def api_entires(net):
def about_page():
return render_template('about.html')
def restricted_page():
return render_template('restricted.html')
def git_page():
return redirect("//")
......@@ -65,7 +65,8 @@ active
<span style="color:red">Restricted access.</span>
Upstream does not permit data redistribution, hence the
network files cannot be downloaded without
authorization. See <a href="/restricted">here</a> how to
gain access.
{% else %}
{{entry.upstream_license[0]}}, <a href="{{entry.upstream_license[1]}}">{{entry.upstream_license[1]}}</a>
{% endif %}
{% extends "base.html" %}
{% block about_active %}
{% endblock %}
{% block content %}
<div class="column-group">
<div class="xlarge-50 large-50 small-100 bottom-space" style="padding-right:.5em">
<h1 style="margin-bottom: .5em">Restricted datasets</h1>
<p>Some datasets included in the repository cannot be downloaded
without authorization, because open distribution is unfortunately
not permitted by the upstream source. In this case, the download will
fail with an <code>401 Unauthorized</code> error.</p>
<p>It is possible to be granted access to these files with an
authorization token. This token needs to be passed as
the <code>WWW-Authenticate</code> HTTP request header with a value
WWW-Authenticate: &lt;TOKEN&gt;
where <code>&lt;TOKEN&gt;</code> needs to be replaced by the actual
token string.</p>
<p>This can be done via <a href="">curl</a> as
curl --header "WWW-Authenticate: &lt;TOKEN&gt;" >
<p> If you are
using <a href="//">graph-tool</a>
to access the repository, then the token just needs to be stored in
a file named
in your home directory.</p>
<p> If you believe you should be granted authorization, please
contact <a href="//">Tiago P. Peixoto</a> to request
a token.
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment