Revision 6528,
392 bytes
checked in by gustavo, 12 years ago
(diff) |
Ticket #2766 - Merge do branch das novas funcionalidaes para o trunk
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[6351] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * @file |
---|
| 5 | * Sample token endpoint. |
---|
| 6 | * |
---|
| 7 | * Obviously not production-ready code, just simple and to the point. |
---|
| 8 | * |
---|
| 9 | * In reality, you'd probably use a nifty framework to handle most of the crud for you. |
---|
| 10 | */ |
---|
| 11 | |
---|
| 12 | require "lib/MongoOAuth2.php"; |
---|
| 13 | |
---|
| 14 | $oauth = new MongoOAuth2(); |
---|
| 15 | try { |
---|
| 16 | $oauth->grantAccessToken(); |
---|
| 17 | } catch (OAuth2ServerException $oauthError) { |
---|
| 18 | $oauthError->sendHttpResponse(); |
---|
| 19 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.