summaryrefslogtreecommitdiffstats
path: root/examples/server/trust.php
diff options
context:
space:
mode:
Diffstat (limited to 'examples/server/trust.php')
-rw-r--r--examples/server/trust.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/server/trust.php b/examples/server/trust.php
new file mode 100644
index 0000000..62a860a
--- /dev/null
+++ b/examples/server/trust.php
@@ -0,0 +1,23 @@
+<?php
+
+require_once "common.php";
+
+init();
+
+if (!isset($_SESSION['request'])) {
+ // Should not happen
+ redirect($server_url);
+}
+
+$info = unserialize($_SESSION['request']);
+
+unset($_SESSION['request']);
+
+if (isset($_POST['trust'])) {
+ // This is a trusted site, so continue
+ succeed($info);
+} else {
+ redirect($info->getCancelURL());
+}
+
+?> \ No newline at end of file