Show client name in oauth authorization (works for tomdroid only)
[grauphel.git] / controller / oauthcontroller.php
index 29198bc1a2f9d120240ec291f09cf114f9828a13..6ab17d224f64dfeae05b5ff11ce2e23a28910b0c 100644 (file)
@@ -118,10 +118,16 @@ class OauthController extends Controller
             return $token;
         }
 
+        $client = 'unknown';
+        if (isset($_GET['client'])) {
+            $client = $_GET['client'];
+        }
+
         $res = new TemplateResponse('grauphel', 'oauthAuthorize');
         $res->setParams(
             array(
                 'oauth_token' => $token->tokenKey,
+                'client'      => $client,
                 'formaction'  => $this->deps->urlGen->linkToRoute(
                     'grauphel.oauth.confirm'
                 ),
@@ -251,7 +257,7 @@ class OauthController extends Controller
                 array(
                     'oauth_token'              => $token->tokenKey,
                     'oauth_token_secret'       => $token->secret,
-                    'oauth_callback_confirmed' => 'TRUE'
+                    'oauth_callback_confirmed' => 'true'
                 )
             );
         } catch (OAuthException $e) {