Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up, adding oauth to multiple templates at the same time.:
- Loading branch information
root
committed
Sep 11, 2017
1 parent
622d163
commit 87291c1
Showing
10 changed files
with
149 additions
and
96 deletions.
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,34 @@ | ||
<html> | ||
<head> | ||
<style>body {font-family: "Trebuchet MS", Helvetica, sans-serif;}</style> | ||
%include('header.tpl') | ||
|
||
|
||
<body> | ||
% if applied == 0: | ||
<h1>Access Granted</h1> | ||
Access has been granted. Normally the server would later provision the template onto the domain. | ||
<p/> | ||
Here we simply emulate this asynchronous provisioning by allowing the template to be applied now. | ||
Access has been granted to {{domain}}. | ||
<br/><br/> | ||
% else: | ||
<h1>Applied</h1> | ||
You've applied a template to {{domain}} | ||
% if subdomain != '' and subdomain != None: | ||
with sub domain '{{subdomain}}' | ||
% end | ||
. You can apply either template to the same domain, or to another sub domain. | ||
% end | ||
<h1>Interesting information (read only):</h1> | ||
<form method="post" action="/asyncconfig"> | ||
<table> | ||
<tr><td>Domain:</td><td><input size=50 name=domain type=text readonly value="{{domain}}"/></td></tr> | ||
<tr><td>Message:</td><td><input size=50 name=message type=text readonly value="{{message}}"/></td></tr> | ||
<tr><td>API Url Root:</td><td><input size=50 name=urlAPI type=text readonly value="{{urlAPI}}"/></td></tr> | ||
<tr><td>Code:</td><td><input size=50 name=oAuthCode type=text readonly value="{{code}}"/></td></tr> | ||
% if applied == 0: | ||
<tr><td>oAuth Response Code from consent:</td><td><input size=50 name=oAuthCode type=text readonly value="{{code}}"/></td></tr> | ||
<tr><td>JSON from Access Token Fetch</td><td><textarea name=json_response type=text readonly rows="10" cols="50">{{json_response}}</textarea></td></tr> | ||
<tr><td>Access Token (oAuth):</td><td><input size=50 name=access_token type=text readonly value="{{access_token}}"/></td></tr> | ||
<tr><td> </td><td><input type="submit"/></td> | ||
% end | ||
<tr><td>Domain:</td><td><input size=50 name=domain type=text readonly value="{{domain}}"/></td></tr> | ||
<tr><td>API Url Root from DNS Provider:</td><td><input size=50 name=urlAPI type=text readonly value="{{urlAPI}}"/></td></tr> | ||
<tr><td>Access Token:</td><td><input size=50 name=access_token type=text readonly value="{{access_token}}"/></td></tr> | ||
</table> | ||
<h1>Apply template:</h1> | ||
<table> | ||
<tr><td>Sub Domain:</td><td><input size=50 name=subdomain type=text value="{{subdomain}}"/></td></tr> | ||
<tr><td>Message:</td><td><input size=50 name=message type=text value="{{message}}"/></td></tr> | ||
<tr><td> </td><td><input type="submit" value="Apply Template 1"/></td> | ||
<tr><td> </td><td><input type="submit" value="Apply Template 2" name="template2"/></td> | ||
</table> | ||
</form> | ||
</body> | ||
</html> | ||
%include('footer.tpl') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
<html> | ||
<head> | ||
<style>body {font-family: "Trebuchet MS", Helvetica, sans-serif;}</style> | ||
</head> | ||
%include('header.tpl') | ||
|
||
<body> | ||
<h1>Provider Found</h1> | ||
Your domain uses {{providerName}} | ||
<p/> | ||
<a target=_new href='{{synchronousTargetUrl}}'>Configure Synchronously</a> | ||
<a target=_new href='{{synchronousTargetUrl1}}'>Configure Synchronously</a> | ||
<p/> | ||
<a target=_new href='{{synchronousSignedTargetUrl}}'>Configure Synchronously with Signature verification (not supported by all providers)</a> (Verified = {{verified}}) | ||
<a target=_new href='{{synchronousTargetUrl2}}'>Configure Synchronously (alternative template)</a> | ||
<p/> | ||
<a target=_new href='{{synchronousSignedTargetUrl1}}'>Configure Synchronously with Signature verification (not supported by all providers)</a> (Verified = {{verified}}) | ||
<p/> | ||
<a target=_new href='{{synchronousSignedTargetUrl2}}'>Configure Synchronously (alternative template) with Signature verification (not supported by all providers)</a> (Verified = {{verified}}) | ||
<p/> | ||
% if asynchronousTargetUrl != None: | ||
<a href='{{asynchronousTargetUrl}}'>Configure Asynchronously</a> | ||
% else: | ||
Async not supported by provider | ||
% end | ||
</body> | ||
</html> | ||
%include('footer.tpl') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<html> | ||
<head> | ||
<title>Domain Connect Example</title> | ||
<style>body {font-family: "Trebuchet MS", Helvetica, sans-serif;}</style> | ||
</head> | ||
|
||
<script> | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | ||
ga('create', 'UA-102550640-1', 'auto'); | ||
ga('send', 'pageview'); | ||
</script> | ||
<body> | ||
<a href="/domainconnect.org"><img src="static/dclogo.png"></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
<html> | ||
<head> | ||
<style>body {font-family: "Trebuchet MS", Helvetica, sans-serif;}</style> | ||
</head> | ||
%include('header.tpl') | ||
|
||
<body> | ||
<img src="static/dclogo.png"> | ||
<h1>Example Service Provider</h1> | ||
<h2>This website uses stateless hosting to demonstrate Domain Connect.</h2> | ||
<h2>This website demonstrates a sample Domain Connect Service Provider. You enter your domain name, subdomain (optional) and a message to display. Using Domain Connect, these values are places in DNS which are used to later render the message entered as the site content for the domain/subdomain.</h2> | ||
|
||
<form method="post" action='/config'> | ||
<table> | ||
<tr><td>Domain Name</td><td><input name='domain' type="text"/></td></tr> | ||
<tr><td>Sub Domain Name (optional)</td><td><input name='subdomain' type="text"/></td></tr> | ||
<tr><td>Message</td><td><input name='message' type="text"/></td></tr> | ||
<tr><td> </td><td><input type="submit"/></td></tr> | ||
<tr><td> </td><td><input type="submit" value="Configure" /></td></tr> | ||
</table> | ||
</form> | ||
</body> | ||
</html> | ||
|
||
%include('footer.tpl') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
<html> | ||
<head> | ||
<style>body {font-family: "Trebuchet MS", Helvetica, sans-serif;}</style> | ||
</head> | ||
|
||
<body> | ||
%include('header.tpl') | ||
<h1>Invalid Data</h1> | ||
Domain name must be a valid domain name. | ||
<br/> | ||
Message is required, must be less than 255 characters, and must not contain any special characters. | ||
</body> | ||
</html> | ||
%include('footer.tpl') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
<html> | ||
<head> | ||
<style>body {font-family: "Trebuchet MS", Helvetica, sans-serif;}</style> | ||
</head> | ||
|
||
<body> | ||
%include('header.tpl') | ||
<h1>Manual Change Needed</h1 | ||
Domain does not support domain connect. You would need to make DNS changes manually. | ||
</body> | ||
</html> | ||
%include('footer.tpl') | ||
|