From 86f52118fee5b42372c5c46cff806c3c0f134b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20D=C9=AA=E1=B4=87=E1=B4=84=E1=B4=8B=E1=B4=8F?= =?UTF-8?q?=E1=B4=A1?= Date: Mon, 1 Dec 2008 21:49:58 +0100 Subject: add heading, link to PAUSE --- root/templates/index.xsl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/root/templates/index.xsl b/root/templates/index.xsl index adca9c6..8ff28e7 100644 --- a/root/templates/index.xsl +++ b/root/templates/index.xsl @@ -17,15 +17,16 @@ @import "default.css"; - + -

The website '' wants to verify your PAUSE identity.

+

PAUSE OpenID login service

+

The website '' wants to verify your PAUSE identity.

- +
-- cgit v1.2.3 From 61c971d938190a40fa025134f60a6da781818f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20D=C9=AA=E1=B4=87=E1=B4=84=E1=B4=8B=E1=B4=8F?= =?UTF-8?q?=E1=B4=A1?= Date: Mon, 1 Dec 2008 22:11:37 +0100 Subject: add language declaration --- root/templates/index.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/templates/index.xsl b/root/templates/index.xsl index 8ff28e7..17862fd 100644 --- a/root/templates/index.xsl +++ b/root/templates/index.xsl @@ -10,7 +10,7 @@ - + Sign in with OpenID -- cgit v1.2.3 From 32b0ff14cda17d53a18b591185325c5735a0f19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Kr=C3=B6ll?= Date: Mon, 1 Dec 2008 22:20:34 +0100 Subject: Pass through params to stylesheet --- lib/PAUSE/OpenID/Controller/Root.pm | 5 +++++ root/templates/index.xsl | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/PAUSE/OpenID/Controller/Root.pm b/lib/PAUSE/OpenID/Controller/Root.pm index c37b2c2..ba6db5d 100644 --- a/lib/PAUSE/OpenID/Controller/Root.pm +++ b/lib/PAUSE/OpenID/Controller/Root.pm @@ -32,6 +32,11 @@ sub index :Path :Args(0) { $c->stash->{xml} =< XML + + # Pass through parameters (unchecked for now) + foreach my $key ( keys %{$c->req->params} ) { + $c->stash->{$key} = $c->req->param($key); + } # Hello World $c->forward('PAUSE::OpenID::View::XSLT'); diff --git a/root/templates/index.xsl b/root/templates/index.xsl index adca9c6..c471513 100644 --- a/root/templates/index.xsl +++ b/root/templates/index.xsl @@ -7,7 +7,7 @@ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" indent="no"/> - + @@ -19,7 +19,7 @@ -

The website '' wants to verify your PAUSE identity.

+

The website '' wants to verify your PAUSE identity.

-- cgit v1.2.3 From 9cc9b2e19204b807b95985214cae021e79f237c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20D=C9=AA=E1=B4=87=E1=B4=84=E1=B4=8B=E1=B4=8F?= =?UTF-8?q?=E1=B4=A1?= Date: Mon, 1 Dec 2008 22:49:33 +0100 Subject: correct server endpoint --- root/templates/index.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/templates/index.xsl b/root/templates/index.xsl index 433894d..1f3c43c 100644 --- a/root/templates/index.xsl +++ b/root/templates/index.xsl @@ -13,7 +13,7 @@ Sign in with OpenID - + -- cgit v1.2.3 From cfdbde16b89b845ab1297cc25dbde08649d42758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Kr=C3=B6ll?= Date: Mon, 1 Dec 2008 22:55:30 +0100 Subject: Stub for error page; redirect to error page when openid.return_to parameter is not given --- lib/PAUSE/OpenID/Controller/Root.pm | 15 +++++++++++++-- root/templates/error.xsl | 29 +++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 root/templates/error.xsl diff --git a/lib/PAUSE/OpenID/Controller/Root.pm b/lib/PAUSE/OpenID/Controller/Root.pm index 129f3a4..ca52356 100644 --- a/lib/PAUSE/OpenID/Controller/Root.pm +++ b/lib/PAUSE/OpenID/Controller/Root.pm @@ -29,6 +29,11 @@ PAUSE::OpenID::Controller::Root - Root Controller for PAUSE::OpenID sub index :Path :Args(0) { my ( $self, $c ) = @_; + if ( not $c->req->param('openid.return_url') ) { + #$c->flash->{xml} = 'Missing parameter'; + $c->res->redirect($c->uri_for('/error')); + } + $c->stash->{xml} =< XML @@ -38,7 +43,13 @@ XML $c->stash->{$key} = $c->req->param($key); } - # Hello World + $c->forward('PAUSE::OpenID::View::XSLT'); +} + +sub error :Local { + my ( $self, $c ) = @_; + #$c->stash->{xml} = $c->flash->{xml}; + $c->stash->{xml} = ''; $c->forward('PAUSE::OpenID::View::XSLT'); } @@ -55,7 +66,7 @@ sub login :Local { my $username = $c->req->param('username'); my $password = $c->req->param('password'); - $c->log->debug('username "'.$username.'" login attemp'); + $c->log->debug('username "'.$username.'" login attempt'); $c->res->redirect($c->uri_for('/login_failed')); } diff --git a/root/templates/error.xsl b/root/templates/error.xsl new file mode 100644 index 0000000..3aa236e --- /dev/null +++ b/root/templates/error.xsl @@ -0,0 +1,29 @@ + + + + + + + + + Error + + + + +

An error occured.

+ +

+ +

+
+ + +
+
-- cgit v1.2.3