summaryrefslogtreecommitdiff
path: root/actions/apioauthpin.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-10-06 19:20:47 -0700
committerZach Copley <zach@status.net>2010-10-06 19:20:47 -0700
commit69e621a3e882cd060eb4314554aada7167edd897 (patch)
tree9d6d31b7e72d8f22e1029a3a90316046d1d73828 /actions/apioauthpin.php
parentf71912440a17f468b1d60db2388fc6030631fce6 (diff)
- Update ApiOauthAuthorizeAction to 1.0a
- Fix enumerable bugs - New page for displaying 1.0a verifier (still needs work)
Diffstat (limited to 'actions/apioauthpin.php')
-rw-r--r--actions/apioauthpin.php69
1 files changed, 69 insertions, 0 deletions
diff --git a/actions/apioauthpin.php b/actions/apioauthpin.php
new file mode 100644
index 000000000..5a88b5e59
--- /dev/null
+++ b/actions/apioauthpin.php
@@ -0,0 +1,69 @@
+<?php
+/**
+ * StatusNet, the distributed open-source microblogging tool
+ *
+ * Action for displaying an OAuth verifier pin
+ *
+ * PHP version 5
+ *
+ * LICENCE: This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category Action
+ * @package StatusNet
+ * @author Zach Copley <zach@status.net>
+ * @copyright 2010 StatusNet, Inc.
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://status.net/
+ */
+
+if (!defined('STATUSNET') && !defined('LACONICA')) {
+ exit(1);
+}
+
+require_once INSTALLDIR . '/lib/info.php';
+
+/**
+ * Class for displaying an OAuth verifier pin
+ *
+ * @category Action
+ * @package StatusNet
+ * @author Zach Copley <zach@status.net>
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://status.net/
+ */
+
+class ApiOauthPinAction extends InfoAction
+{
+
+ function __construct($verifier)
+ {
+ $this->verifier = $verifier;
+ $title = _('Authorization succeeded.');
+ parent::__construct($title, $title);
+ }
+
+ // TODO: Check for logged in state!
+
+ /**
+ * Display content.
+ *
+ * @return nothing
+ */
+ function showContent()
+ {
+ // XXX: make this much nicer
+ $this->element('div', array('class' => 'info'), $this->verifier);
+ }
+
+}