summaryrefslogtreecommitdiff
path: root/actions/apioauthauthorize.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-10-07 13:51:47 -0700
committerZach Copley <zach@status.net>2010-10-07 13:51:47 -0700
commitb8f2cc4e6f121f4ffacefb6fe632beb3b25eb126 (patch)
tree3175e669c8baeea67ab1845102db4b9e339fe3c3 /actions/apioauthauthorize.php
parent82a0a1a74b9452fbc122fed9ee9c4e0a86b7a79e (diff)
Make the verifier pin display a little nicer
Diffstat (limited to 'actions/apioauthauthorize.php')
-rw-r--r--actions/apioauthauthorize.php25
1 files changed, 16 insertions, 9 deletions
diff --git a/actions/apioauthauthorize.php b/actions/apioauthauthorize.php
index 6772052f2..d0b621140 100644
--- a/actions/apioauthauthorize.php
+++ b/actions/apioauthauthorize.php
@@ -449,21 +449,28 @@ class ApiOauthAuthorizeAction extends Action
function showAuthorized()
{
+ $title = sprintf(
+ _("You have successfully authorized %s."),
+ $this->app->name
+ );
- if ($this->reqToken->verified_callback == 'oob') {
+ $msg = sprintf(
+ _('Please return to %s and enter the following security code to complete the process.'),
+ $this->app->name
+ );
- $pin = new ApiOauthPinAction($this->reqToken->verifier);
+ if ($this->reqToken->verified_callback == 'oob') {
+ $pin = new ApiOauthPinAction($title, $msg, $this->reqToken->verifier);
$pin->showPage();
-
} else {
+ // NOTE: This should probably never happen; trhow an error instead?
+
$info = new InfoAction(
- _("Authorization succeeded."),
- sprintf(
- _('The request token %s has been authorized. Please exchange it for an access token using this verifier: %s'),
- $this->oauthTokenParam,
- $this->reqToken->verifier
- )
+ $title,
+ $msg,
+ $this->oauthTokenParam,
+ $this->reqToken->verifier
);
$info->showPage();