Permalink
Browse files

moved OAuthUtil to oauth as3 core lib

  • Loading branch information...
1 parent 7efffdf commit bff6eaa40ce565d3a542e2780a7187d04a1cbf06 @srohde committed Jan 14, 2010
View
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<actionScriptProperties mainApplicationPath="OAuth.as" projectUUID="cd2f620e-af74-4d06-b26e-3251bc79255a" version="6">
- <compiler additionalCompilerArguments="" autoRSLOrdering="true" copyDependentFiles="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="true" outputFolderPath="bin" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="true" outputFolderPath="bin" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="4" path=""/>
<libraryPathEntry kind="1" linkType="1" path="libs"/>
- <libraryPathEntry kind="3" linkType="1" path="/oauth-as3/bin/oauth-as3.swc" useDefaultLinkType="false"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
View
@@ -4,7 +4,6 @@
<classEntry path="org.flaircode.oauth.IOAuth"/>
<classEntry path="org.flaircode.oauth.OAuth"/>
<classEntry path="org.flaircode.oauth.OAuthLoader"/>
- <classEntry path="org.flaircode.oauth.OAuthUtil"/>
</includeClasses>
<includeResources/>
<namespaceManifests/>
View
Binary file not shown.
View
Binary file not shown.
@@ -24,6 +24,7 @@ package org.flaircode.oauth {
import org.iotashan.oauth.OAuthRequest;
import org.iotashan.oauth.OAuthSignatureMethod_HMAC_SHA1;
import org.iotashan.oauth.OAuthToken;
+ import org.iotashan.utils.OAuthUtil;
import org.iotashan.utils.URLEncoding;
public class OAuth implements IOAuth {
@@ -67,6 +68,7 @@ package org.flaircode.oauth {
*
*/
public function OAuth( consumerKey : String = null, consumerSecret : String = null ) {
+ var forceCompile:OAuthUtil;
_consumerKey = consumerKey;
_consumerSecret = consumerSecret;
}
@@ -1,51 +0,0 @@
-/*
- Copyright 2009 Sönke Rohde
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-package org.flaircode.oauth {
- import org.iotashan.oauth.OAuthToken;
-
- /**
- * Util class for OAuth specific operations
- * @author soenkerohde
- *
- */
- public class OAuthUtil {
-
- /**
- *
- * @param tokenResponse Result from a getRequest/AccessToken call.
- * @return OAuthToken containing key/secret of the tokenResponse request.
- *
- */
- public static function getTokenFromResponse( tokenResponse : String ) : OAuthToken {
- var result:OAuthToken = new OAuthToken();
-
- var params:Array = tokenResponse.split( "&" );
- for each ( var param : String in params ) {
- var paramNameValue:Array = param.split( "=" );
- if ( paramNameValue.length == 2 ) {
- if ( paramNameValue[0] == "oauth_token" ) {
- result.key = paramNameValue[1];
- } else if ( paramNameValue[0] == "oauth_token_secret" ) {
- result.secret = paramNameValue[1];
- }
- }
- }
-
- return result;
- }
- }
-}

0 comments on commit bff6eaa

Please sign in to comment.