Archived
1
0
Fork 0

initial commit

This commit is contained in:
Henrik Hautakoski 2017-09-01 17:10:27 +02:00
commit e869a1cab4
107 changed files with 9029 additions and 0 deletions

42
app/views/auth/index.volt Normal file
View file

@ -0,0 +1,42 @@
<div class="login-container section">
<h3>Login</h3>
<div class="alert alert-info">
<p class="text-center"><strong>Heads up!</strong> Signup is currently not available.</p>
<p>
Login using username/password can be setup after registration.
First time users can only register with third party services below
</p>
</div>
<span class="spacer"></span>
<form class="form" method="post" action="">
<div class="form-group">
{{ form.render('Email') }}
</div>
<div class="form-group">
{{ form.render('Password') }}
</div>
<div class="form-group">
{{ form.render('Login') }}
</div>
</form>
<span class="spacer"></span>
<div class="oauth">
<a class="button button-github" href="{{ url(['for': 'oauth', 'strategy': 'github']) }}">
{{ icon('social-github') }} GitHub
</a>
<a class="button button-google" href="{{ url(['for': 'oauth', 'strategy': 'google']) }}">
{{ icon('social-google') }} Google
</a>
</div>
</div>

View file

@ -0,0 +1,47 @@
{% if error %}
<p><strong>Error: </strong>{{ error }}</p>
{% else %}
<section>
<h2>Authentication sucessful</h2>
<p>Authentication is successful and auth response is <span>validated</span>.</p>
<p>Returned auth response:</p>
<table class="table table-striped">
<tbody>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
{% for key,auth in auths['auth'] %}
{% if auth is scalar %}
<tr>
<th> {{key }}</th>
<th> {{auth}} </th>
</tr>
{% else %}
<tr>
<th> {{key}} </th>
<td><ul>
{% for key1,item in auth %}
{% if key1 is sameas('image') %}
<li><strong>{{key1}}</strong>:<img src="{{item}}" width="100" height="100"> </li>
{% elseif key1 == 'urls' %}
<li><strong>{{key1}}</strong>: {{item['google']}} </li>
{% else %}
<li><strong>{{key1}}</strong>: {{item}} </li>
{% endif %}
{% endfor %}
</ul></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
<h2>Raw response</h2>
{{"<pre>"}}
<?php print_r($auths);?>
</section>
{% endif %}