{% extends "_root.html" %}
{% block body %}
<h1>Post Authorization Request</h1>
{% if resp and resp.error %}
<p>
	It looks like your server returned an error;
	it being <code>{{ resp.error }}</code>.
</p>
{% if resp.error_description %}
<p>
	{{ resp.error_description }}
</p>
{% endif %}
{% else %}
<p>Your server approved the request. By claiming a token, that'll communicate to this testing server
	<em>which scopes</em> you've given it permission to. By claiming a profile, you'll give this testing
	server information about <em>who/what gave permission</em> to this now-successful authorization
	request.
</p>
<form action="/client/redeem" method="post">
	<input type=hidden name="code" value="{{ resp.code }}" />
	<fieldset class="grid">
		<button name="redeem" value="profile">Obtain Profile</button>
		<button name="redeem" value="token">Obtain Token</button>
	</fieldset>
</form>
<p>
	Or you can start this over at <a href="/client">the client</a>.
</p>
{% endif %}
{% endblock body %}
