aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2018-02-22 15:10:05 -0500
committerAndrew Manning <tamanning@zoho.com>2018-02-22 15:10:05 -0500
commit43fca182e3915734587abf389d819546ebade3a4 (patch)
tree4d6133217f903e2bcc3e2fe7cf6c0416df44aaee /view
parent8e5c1135c3e2644ea8501eda067e2b994faa44ab (diff)
downloadvolse-hubzilla-43fca182e3915734587abf389d819546ebade3a4.tar.gz
volse-hubzilla-43fca182e3915734587abf389d819546ebade3a4.tar.bz2
volse-hubzilla-43fca182e3915734587abf389d819546ebade3a4.zip
The authorization step with client registration and authorization code retrieval working. Might not conform perfectly to OAuth2 spec, but it is a start.
Diffstat (limited to 'view')
-rw-r--r--view/tpl/oauth2testvehicle.tpl4
-rwxr-xr-xview/tpl/oauth_authorize.tpl16
2 files changed, 13 insertions, 7 deletions
diff --git a/view/tpl/oauth2testvehicle.tpl b/view/tpl/oauth2testvehicle.tpl
index d4887063c..aebc71bb2 100644
--- a/view/tpl/oauth2testvehicle.tpl
+++ b/view/tpl/oauth2testvehicle.tpl
@@ -2,9 +2,9 @@
{{foreach $endpoints as $ept}}
<div class="oath2test-form-box">
-<form action="{{$baseurl}}/{{$ept.0}}" method="post">
+<form action="{{$baseurl}}/{{$ept.0}}" method="{{$ept.4}}">
<h3>{{$ept.3}}</h3>
- <p>{{$baseurl}}/{{$ept.0}}/?{{foreach $ept.1 as $field}}{{$field.0}}={{$field.1}}&<input type="hidden" name="{{$field.0}}" value="{{$field.1}}" /> {{/foreach}}
+ <p>{{$baseurl}}/{{$ept.0}}/?{{foreach $ept.1 as $field}}{{$field.0}}={{$field.1}}&<input type="hidden" name="{{$field.0}}" value="{{$field.1}}" />{{/foreach}}
</p>
<button type="submit" name="{{$ept.2}}_submit" value="submit" class="btn btn-med" title="">Submit</button>
diff --git a/view/tpl/oauth_authorize.tpl b/view/tpl/oauth_authorize.tpl
index 2b7afa80e..f5da11cdc 100755
--- a/view/tpl/oauth_authorize.tpl
+++ b/view/tpl/oauth_authorize.tpl
@@ -3,8 +3,14 @@
<div class='oauthapp'>
<img src='{{$app.icon}}'>
<h4>{{$app.name}}</h4>
-</div>
-<h3>{{$authorize}}</h3>
-<form method="POST">
-<div class="settings-submit-wrapper"><input class="settings-submit" type="submit" name="oauth_yes" value="{{$yes}}" /></div>
-</form>
+ <h3>{{$authorize}}</h3>
+ <form method="POST">
+ <div class="settings-submit-wrapper">
+ <input type="hidden" name="client_id" value="{{$client_id}}" />
+ <input type="hidden" name="redirect_uri" value="{{$redirect_uri}}" />
+ <input type="hidden" name="state" value="{{$state}}" />
+ <button class="btn btn-lg btn-danger" name="authorize" value="deny" type="submit">{{$no}}</button>
+ <button class="btn btn-lg btn-success" name="authorize" value="allow" type="submit">{{$yes}}</button>
+ </div>
+ </form>
+</div> \ No newline at end of file