Skip to content

Commit

Permalink
support for OAuth 1.0a
Browse files Browse the repository at this point in the history
  • Loading branch information
mojodna committed May 30, 2009
1 parent a7403b9 commit 09c9b75
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/net/yahoo/fireeagle/FireEagleAuth.as
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ package net.yahoo.fireeagle
/**
* Gets a new request token from the auth server. Success or failure returns asynchronously
* via <code>FireEagleEvent</code>.
* @param oauthCallback An optional callback to use once the request token has been authorized.
* @return
*
*/
public function newRequestToken():void
public function newRequestToken(oauthCallback:String = "oob"):void
{ // uses consumer to generate a new request token
_connection.updateToken();
getRequest(FireEagleConfig.AUTH_SERVER + FireEagleConfig.REQUEST_TOKEN_PATH, FireEagleConfig.REQUEST_TOKEN_NAME);
getRequest(FireEagleConfig.AUTH_SERVER + FireEagleConfig.REQUEST_TOKEN_PATH, FireEagleConfig.REQUEST_TOKEN_NAME, { "oauth_callback": oauthCallback });
}

/**
Expand Down Expand Up @@ -168,10 +169,10 @@ package net.yahoo.fireeagle
* @return
*
*/
public function convertToAccessToken():void
public function convertToAccessToken(oauthVerifier:String):void
{ // uses consumer to generate call convert
_connection.updateToken(_requestKey, _requestSecret);
getRequest(FireEagleConfig.AUTH_SERVER + FireEagleConfig.ACCESS_TOKEN_PATH, FireEagleConfig.ACCESS_TOKEN_NAME);
getRequest(FireEagleConfig.AUTH_SERVER + FireEagleConfig.ACCESS_TOKEN_PATH, FireEagleConfig.ACCESS_TOKEN_NAME, { "oauth_verifier": oauthVerifier });
}

/**
Expand Down

0 comments on commit 09c9b75

Please sign in to comment.