Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 require "lib/PDOOAuth2.inc";
00013
00014 $oauth = new PDOOAuth2();
00015
00016 if ($_POST) {
00017 $oauth->finishClientAuthorization($_POST["accept"] == "Yep", $_POST);
00018 }
00019
00020 $auth_params = $oauth->getAuthorizeParams();
00021
00022 ?>
00023 <html>
00024 <head>Authorize</head>
00025 <body>
00026 <form method="post" action="authorize.php">
00027 <?php foreach ($auth_params as $k => $v) { ?>
00028 <input type="hidden" name="<?php echo $k ?>" value="<?php echo $v ?>" />
00029 <?php } ?>
00030 Do you authorize the app to do its thing?
00031 <p>
00032 <input type="submit" name="accept" value="Yep" />
00033 <input type="submit" name="accept" value="Nope" />
00034 </p>
00035 </form>
00036 </body>
00037 </html>