00001 <?php 00002 00003 /** 00004 * @file 00005 * Sample protected resource. 00006 * 00007 * Obviously not production-ready code, just simple and to the point. 00008 * 00009 * In reality, you'd probably use a nifty framework to handle most of the crud for you. 00010 */ 00011 00012 require "lib/PDOOAuth2.inc"; 00013 00014 $oauth = new PDOOAuth2(); 00015 $oauth->verifyAccessToken(); 00016 00017 // With a particular scope, you'd do: 00018 // $oauth->verifyAccessToken("scope_name"); 00019 00020 ?> 00021 00022 <html> 00023 <head> 00024 <title>Hello!</title> 00025 </head> 00026 <body> 00027 <p>This is a secret.</p> 00028 </body> 00029 </html>
1.7.1