Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Added token param to get*Url methods.
Browse files Browse the repository at this point in the history
Prevents duplicate request for a request token if one was already made.
closes gh-18
  • Loading branch information
ericmmartin authored and jmathai committed May 8, 2009
1 parent 8cf70e2 commit 5188b40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions php/EpiOAuth.php
Expand Up @@ -21,15 +21,15 @@ public function getAccessToken()
return new EpiOAuthResponse($resp);
}

public function getAuthenticateUrl()
public function getAuthenticateUrl($token = null)
{
$token = $this->getRequestToken();
$token = $token ? $token : $this->getRequestToken();
return $this->getUrl($this->authenticateUrl) . '?oauth_token=' . $token->oauth_token;
}

public function getAuthorizationUrl()
public function getAuthorizationUrl($token = null)
{
$token = $this->getRequestToken();
$token = $token ? $token : $this->getRequestToken();
return $this->getUrl($this->authorizeUrl) . '?oauth_token=' . $token->oauth_token;
}

Expand Down

0 comments on commit 5188b40

Please sign in to comment.