summaryrefslogtreecommitdiff
path: root/qvisqve/auth_router.py
diff options
context:
space:
mode:
Diffstat (limited to 'qvisqve/auth_router.py')
-rw-r--r--qvisqve/auth_router.py26
1 files changed, 2 insertions, 24 deletions
diff --git a/qvisqve/auth_router.py b/qvisqve/auth_router.py
index 9dfb582..0da34d3 100644
--- a/qvisqve/auth_router.py
+++ b/qvisqve/auth_router.py
@@ -23,29 +23,6 @@ import bottle
import qvisqve
-login_form = '''
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <meta name="description" content="Qvisqve Login">
- <meta name="author" content="Qvarnlabs Ltd">
- <title>Qvisqve Login</title>
- </head>
- <body>
- <form action="/auth" method="POST">
- <input name="attempt_id" value="{{attempt_id}}" type="hidden" />
- User name: <input name="username" type="text" />
- <br />
- Password: <input name="password" type="password" />
- <br />
- <input type="submit" value="Login" />
- </form>
- </body>
-</html>
-'''
-
-
class AuthRouter(qvisqve.Router):
def __init__(self, apps, users, authz_attempts):
@@ -103,7 +80,8 @@ class AuthRouter(qvisqve.Router):
cleaned['redirect_uri'] = redirect_uri
aa = self._attempts.create_attempt(cleaned)
- form = bottle.template(login_form, attempt_id=aa.get_attempt_id())
+ form = qvisqve.render_template(
+ 'login.tmpl', attempt_id=aa.get_attempt_id())
headers = {
'Content-Type': 'text/html; charset=utf-8',
}