diff options
author | tailor <cygnus@cprogrammer.org> | 2007-11-20 20:02:52 +0000 |
---|---|---|
committer | tailor <cygnus@cprogrammer.org> | 2007-11-20 20:02:52 +0000 |
commit | 8d6f82a082e79462bfa1a4026479fbf38bcfc576 (patch) | |
tree | 2f7d79bc7a4267cde83c37e302974be7d0ef3a23 /examples/consumer/finish_auth.php | |
parent | aa9361aaba848687781a67b38387dedf3e7f2b6f (diff) | |
download | php-openid-8d6f82a082e79462bfa1a4026479fbf38bcfc576.zip php-openid-8d6f82a082e79462bfa1a4026479fbf38bcfc576.tar.gz php-openid-8d6f82a082e79462bfa1a4026479fbf38bcfc576.tar.bz2 |
[project @ Update example RP to use PAPE extension]
Diffstat (limited to 'examples/consumer/finish_auth.php')
-rw-r--r-- | examples/consumer/finish_auth.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/consumer/finish_auth.php b/examples/consumer/finish_auth.php index 527291b..a54049d 100644 --- a/examples/consumer/finish_auth.php +++ b/examples/consumer/finish_auth.php @@ -48,6 +48,35 @@ function run() { if (@$sreg['fullname']) { $success .= " Your fullname is '".$sreg['fullname']."'."; } + + $pape_resp = Auth_OpenID_PAPE_Response::fromSuccessResponse($response); + + if ($pape_resp) { + if ($pape_resp->auth_policies) { + $success .= "<p>The following PAPE policies affected the authentication:</p><ul>"; + + foreach ($pape_resp->auth_policies as $uri) { + $success .= "<li><tt>$uri</tt></li>"; + } + + $success .= "</ul>"; + } else { + $success .= "<p>No PAPE policies affected the authentication.</p>"; + } + + if ($pape_resp->auth_age) { + $success .= "<p>The authentication age returned by the " . + "server is: <tt>".$pape_resp->auth_age."</tt></p>"; + } + + if ($pape_resp->nist_auth_level) { + $success .= "<p>The NIST auth level returned by the " . + "server is: <tt>".$pape_resp->nist_auth_level."</tt></p>"; + } + + } else { + $success .= "<p>No PAPE response was sent by the provider.</p>"; + } } include 'index.php'; |