summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorPatrick Uiterwijk <puiterwijk@redhat.com>2014-10-06 19:12:13 +0200
committerPatrick Uiterwijk <puiterwijk@redhat.com>2014-10-24 18:02:21 +0200
commitf461a713ce28e434a34dca4e4d1abbfe255ef1ff (patch)
tree20e3167cfe3b28e8c7163e661fc757ffd8df228b /templates
parentc6fab2542f52f6cca71c207c1925785971e51295 (diff)
downloadipsilon-f461a713ce28e434a34dca4e4d1abbfe255ef1ff.tar.gz
ipsilon-f461a713ce28e434a34dca4e4d1abbfe255ef1ff.tar.xz
ipsilon-f461a713ce28e434a34dca4e4d1abbfe255ef1ff.zip
Add OpenIDP Provider
This commit implements all the core functionality needed to expose an OpenID Identity Provider including a framework to dynamycally add extensions. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/master.html7
-rw-r--r--templates/openid/consent_form.html44
-rw-r--r--templates/openid/userpage.html10
-rw-r--r--templates/openid/xrds.xml16
4 files changed, 77 insertions, 0 deletions
diff --git a/templates/master.html b/templates/master.html
index 21178fc..cf1275a 100644
--- a/templates/master.html
+++ b/templates/master.html
@@ -8,6 +8,13 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="{{ basepath }}/ui/css/ipsilon.css" rel="stylesheet" media="screen, print">
+ {%- if heads %}
+ {%- for group, value in heads.items() %}
+ {%- for head in value %}
+ {{ head }}
+ {%- endfor %}
+ {%- endfor %}
+ {%- endif %}
</head>
<body>
<a href="{{ basepath }}/" id="badge" tabindex="-1">
diff --git a/templates/openid/consent_form.html b/templates/openid/consent_form.html
new file mode 100644
index 0000000..8c3813e
--- /dev/null
+++ b/templates/openid/consent_form.html
@@ -0,0 +1,44 @@
+{% extends "master.html" %}
+{% block main %}
+
+<div class="col-sm-12">
+ <p>The OpenID realying party <b>{{ trustroot }}</b> is asking
+ to authorize access for <b>{{ username }}</b>.</p>
+ <p>Please review the authorization details</p>
+</div>
+
+<div class="col-sm-7 col-md-6 col-lg-5 login">
+ <form class="form-horizontal" role="form" id="consent_form" action="{{ action }}" method="post" enctype="application/x-www-form-urlencoded">
+ <input type="hidden" name="ipsilon_transaction_id" id="ipsilon_transaction_id" value="{{ ipsilon_transaction_id }}">
+ <div class="alert alert-danger">
+{%- for items in authz_details %}
+ {%- for item in items|dictsort %}
+ <div class="form-group">
+ <div class="col-sm-10 col-md-10">{{ item[0] }}:</div>
+ <div class="col-sm-10 col-md-10">{{ item[1] }}</div>
+ </div>
+ {%- endfor %}
+{%- endfor %}
+ </div>
+ <div class="form-group">
+ <label for="remember_for_days" class="col-sm-10 col-md-10">
+ Remember authorization for
+ </label>
+ <div class="col-sm-10 col-md-10">
+ <select name="remember_for_days">
+ <option value="0">never</option>
+ <option value="3">3 days</option>
+ <option value="7">7 days</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-md-offset-2 col-xs-12 col-sm-10 col-md-10 submit">
+ <button type="submit" name="decided_deny" value="Reject" class="btn btn-primary btn-lg" tabindex="3">Reject</button>
+ <button type="submit" name="decided_allow" value="Allow" class="btn btn-primary btn-lg" tabindex="3">Allow</button>
+ </div>
+ </div>
+ </form>
+</div>
+
+{% endblock %}
diff --git a/templates/openid/userpage.html b/templates/openid/userpage.html
new file mode 100644
index 0000000..db87974
--- /dev/null
+++ b/templates/openid/userpage.html
@@ -0,0 +1,10 @@
+{% extends "master.html" %}
+{% block main %}
+<div class="col-sm-12">
+ <div id="content">
+ <p>This is the OpenID landing page for {{ username }}</p>
+ <p>This page is used by the OpenID protocol and has no other use.</p>
+ <p>You can go to the <a href="{{ basepath }}">main page</a> instead.</p>
+ </div>
+</div>
+{% endblock %}
diff --git a/templates/openid/xrds.xml b/templates/openid/xrds.xml
new file mode 100644
index 0000000..86b3e0f
--- /dev/null
+++ b/templates/openid/xrds.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
+ <XRD>
+ <Service>
+{%- for t in types %}
+ <Type>{{ t }}</Type>
+{%- endfor %}
+{%- if uri %}
+ <URI>{{ uri }}</URI>
+{%- endif %}
+{%- if localid %}
+ <LocalID>{{ localid }}</LocalID>
+{%- endif %}
+ </Service>
+ </XRD>
+</xrds:XRDS>