Revision 6528,
1.0 KB
checked in by gustavo, 12 years ago
(diff) |
Ticket #2766 - Merge do branch das novas funcionalidaes para o trunk
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * @file |
---|
5 | * Sample client add script. |
---|
6 | * |
---|
7 | * Obviously not production-ready code, just simple and to the point. |
---|
8 | */ |
---|
9 | |
---|
10 | require "lib/OAuth2StoragePdo.php"; |
---|
11 | |
---|
12 | if ($_POST && isset($_POST["client_id"]) && isset($_POST["client_secret"]) && isset($_POST["redirect_uri"])) { |
---|
13 | $oauth = new OAuth2StoragePDO(); |
---|
14 | $oauth->addClient($_POST["client_id"], $_POST["client_secret"], $_POST["redirect_uri"]); |
---|
15 | } |
---|
16 | |
---|
17 | ?> |
---|
18 | |
---|
19 | <html> |
---|
20 | <head> |
---|
21 | <title>Add Client</title> |
---|
22 | </head> |
---|
23 | <body> |
---|
24 | <form method="post" action="addclient.php"> |
---|
25 | <p> |
---|
26 | <label for="client_id">Client ID:</label> |
---|
27 | <input type="text" name="client_id" id="client_id" /> |
---|
28 | </p> |
---|
29 | <p> |
---|
30 | <label for="client_secret">Client Secret (password/key):</label> |
---|
31 | <input type="text" name="client_secret" id="client_secret" /> |
---|
32 | </p> |
---|
33 | <p> |
---|
34 | <label for="redirect_uri">Redirect URI:</label> |
---|
35 | <input type="text" name="redirect_uri" id="redirect_uri" /> |
---|
36 | </p> |
---|
37 | <input type="submit" value="Submit" /> |
---|
38 | </form> |
---|
39 | </body> |
---|
40 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.