Changeset 607204
- Timestamp:
- 10/02/2012 09:14:19 PM (14 years ago)
- Location:
- lips/branches/dev-0.8.8
- Files:
-
- 2 edited
-
lips.php (modified) (2 diffs)
-
lips_oauth.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lips/branches/dev-0.8.8/lips.php
r607180 r607204 1435 1435 // The thing is attempted to be authenticated, so it needs a Identification or 1436 1436 // another auth_req thing. 1437 try { 1438 $oauth = LinkedInProfileSyncOAuth::fromTokenStore($this->tokenstore, false); 1439 $oauth->authorize(trim($input["pin"]), array($this, "setOAuthError"), array("pin" => $input["pin"], "oauth" => $oauth, "class" => "auth")); 1440 } 1441 catch (OAuthException2 $e) { 1437 $oauth = LinkedInProfileSyncOAuth::fromTokenStore($this->tokenstore, false); 1438 if (! $oauth->authorize(trim($input["pin"]), array($this, "setOAuthError"), array("pin" => $input["pin"], "oauth" => $oauth, "class" => "auth"))) { 1442 1439 $errcount++; 1443 1440 } … … 1621 1618 } 1622 1619 // ["lastResponse"]=> string(98) "oauth_problem=additional_authorization_required&oauth_problem_advice=verifier%20does%20not%20match" 1623 $oauth = $callback_specific['oauth']; 1624 add_settings_error($callback_specific, "oauth_authorization_1", $message . "<br/>" . $oauth->getLastResponse()); 1620 add_settings_error($callback_specific, "oauth_authorization_1", $message . "<br/>" . $e->getMessage()); 1625 1621 } 1626 1622 else if (null == $callback_specific) { -
lips/branches/dev-0.8.8/lips_oauth.php
r607185 r607204 185 185 */ 186 186 public function authorize($pin, $failure_callback = '', $failure_callback_param = null) { 187 $ authorized_token = null;187 $is_authorized = false; 188 188 189 189 // Get consumer token … … 195 195 try { 196 196 $this->getAccessToken($id_token['token'], $pin, LinkedInProfileSyncOAuth::getCAInfo()); 197 $is_authorized = true; 197 198 } 198 199 catch (OAuthException2 $e) { … … 203 204 return $this->authorize($pin, $failure_callback, $failure_callback_param); 204 205 } 205 206 } 207 208 return $authorized_token; 206 } 207 208 return $is_authorized; 209 209 } 210 210
Note: See TracChangeset
for help on using the changeset viewer.