Coder Social home page Coder Social logo

bdboauth1manager's People

Contributors

bdbergeron avatar jmah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bdboauth1manager's Issues

isAuthorized doesn't work as expected

it only checks if accessToken is not nil, doesn't check if it's expired.

also, everytime saveToken is called, it assigns accessToken (even when we just received requestToken).

Always get could not acquire OAuth request token

I am to sign in from Twitter api by iOS Application. Since I am using AFNetworking, I chose your code for it.
if (![[BDBTwitterClient sharedClient] isAuthorized])
{
dispatch_async(dispatch_get_main_queue(), ^{
[[BDBTwitterClient sharedClient] authorize];
});
}

I call the above code in action method of twitter sign in button. In the current viewController's view did load method I use:
[BDBTwitterClient createWithConsumerKey:kBDBTwitterClientOAuthConsumerKey secret:kBDBTwitterClientOAuthSecretKey];

And in app's target's info section, I have added a URL type with identifier as my bundle identifier and URL scheme of my own choice (JAWA_Twitter). I have used the same URL Scheme in your BDBTwitterClient class as: static NSString * const kBDBTwitterClientOAuthCallbackURL = @"JAWA_Twitter://authorize";

Signature only

I'm using afnetworking to communicate with a third party rest api that requires oauth1a ( yahoo boss and yelp api).

They provide me with a secret and key. I don't need a token or callback URL etc.
I'm using afnetworking.

How do I use this library.
Your help would be appreciated. All the examples do fancy URL callbacks etc.

Yelp provides token

When you create a Yelp Developer Account they provide you with ready-made/fixed:
Consumer Key, Consumer Secret, Token, Token Secret.

I was wondering if it was possible to use your library without having to call: fetchAccessTokenWithPath:

(since you already have the token)

Carthage and shared frameworks!

Hi
I found this issue when I try to use carthage to build the framework.

Fetching BDBOAuth1Manager
*** Checking out BDBOAuth1Manager at "2.0.0"
*** xcodebuild output can be found in /var/folders/hj/xzndmnhx0613xb46m68cwtq40000gn/T/carthage-xcodebuild.T9TfYv.log
*** Skipped building BDBOAuth1Manager due to the error:
Dependency "BDBOAuth1Manager" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/bdbergeron/BDBOAuth1Manager/issues/new

Please advise if BDBOAuth1Manager cannot be installed by carthage?
I try to install with different version of BDBOAuth1Manager and none of them are installed successfully.

thank you for response.

Broken Build

Commit 8635b7b breaks our build. Doesn't this apply only if you build AFNetworking itself into a standalone framework called "AFNetworking"?

(We build BDBOAuth1Manager & AFNetworking into an OS X framework.)

Crash after aborted login attempt

I've got a crash which I can reproduce using the following steps:

  1. Begin OAuth login process; app bounces to Safari.
  2. Switch back to app without completing login process
  3. Tap button to begin login process again.

This occurs even if I call deauthorize on the session manager before attempting to log in again. Is there another call I should be making before reattempting the authentication?

2014-01-02 11:45:58.338 Skein[76189:70b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(
    0   CoreFoundation                      0x0201a5e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x01cd98b6 objc_exception_throw + 44
    2   CoreFoundation                      0x01fce9c2 -[__NSArrayI objectAtIndex:] + 210
    3   CoreFoundation                      0x02099608 -[NSArray objectAtIndexedSubscript:] + 40
    4   Skein                               0x0008eb40 -[NSDictionary(BDBOAuth1Manager) initWithQueryString:] + 640
    5   Skein                               0x0008e88b +[NSDictionary(BDBOAuth1Manager) dictionaryFromQueryString:] + 123
    6   Skein                               0x0008805a -[BDBOAuthToken initWithQueryString:] + 170
    7   Skein                               0x00087dcd +[BDBOAuthToken tokenWithQueryString:] + 141
    8   Skein                               0x0008d02c __94-[BDBOAuth1SessionManager fetchRequestTokenWithPath:method:callbackURL:scope:success:failure:]_block_invoke + 268
    9   Skein                               0x00074505 __72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_280 + 213
    10  libdispatch.dylib                   0x02c8c7f8 _dispatch_call_block_and_release + 15
    11  libdispatch.dylib                   0x02ca14b0 _dispatch_client_callout + 14
    12  libdispatch.dylib                   0x02c8f75e _dispatch_main_queue_callback_4CF + 340
    13  CoreFoundation                      0x0207fa5e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
    14  CoreFoundation                      0x01fc06bb __CFRunLoopRun + 1963
    15  CoreFoundation                      0x01fbfac3 CFRunLoopRunSpecific + 467
    16  CoreFoundation                      0x01fbf8db CFRunLoopRunInMode + 123
    17  GraphicsServices                    0x032919e2 GSEventRunModal + 192
    18  GraphicsServices                    0x03291809 GSEventRun + 104
    19  UIKit                               0x00d15d3b UIApplicationMain + 1225
    20  Skein                               0x00005f6d main + 141
    21  libdyld.dylib                       0x02f3370d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
signal %d, info %p, uapVoid %p
Program ended with exit code: 0

Provide hook to use AFJSONRequestSerializer

Currently BDBOAuth1RequestSerializer subclasses AFHTTPRequestSerializer but I want to be able to send requests that are serialized wth AFJSONRequestSerializer due to the nature of the data I'm passing with the request. Is there a way to do this?

Base64 Dependency?

iOS 7 & Mavericks have built-in Base64 support.

If it's included for compatibility with older OSes, couldn't it be conditional on the SDK used?

(BTW, thanks for this project! Works quite well.)

How can i use this with 2 legged oauth authentication?

How can i use this with 2 legged oauth authentication....my api call are from drupal webservices...can i get an idea how to use this with drupal api where i only need consumer key and consumer secret to authenticate the user for api access......Thanks

Subtle bug in fetchRequestToken

I am using Tumblr API. Tumblr have specifically designed their OAuth flow to replicate Twitter (which I know you are familiar with).

I copied your Twitter code but changed the URL endpoints and a few other things for tumblr.

I call the authorize method which calls fetchRequestTokenWithPath.
It opens up a Safari window.
App intersepts the callback and it calls fetchAccessTokenWithPath.

Every time I run the app, it ALWAYS FAILS the FIRST time but works the second time. This hinted to me that there was a problem with the code somewhere. Because my code doesn't change and is very simple, I looked into your code.

AFNetworking 2.6 breaks Twitter Oauth

I just logged an issue (AFNetworking/AFNetworking/issues/2999) about AFNetworking 2.6 not percent-encoding slashes in the parameters. In particular, the oauth_callback parameter's slashes are left intact, so I get a 401 Unauthorized error from Twitter's API.

Is there any approach from within BDBOAuth1Manager you can think of to work around this issue in the meantime?

Thanks.

Cocoapods and use_frameworks!

Hi,

This is more of a question about cocoapods, so sorry if this is the wrong place to ask! When integrating it into a vanilla Xcode project, using a Podfile with the use_frameworks! option, I get complaints about not being able to find the correct header files. I can change the path of the #import statements from:

#import "AFHTTPRequestOperationManager.h"

to

#import <AFNetworking/AFHTTPRequestOperationManager.h>

My symptoms are exactly as http://stackoverflow.com/questions/30262891/cocoapods-framework-cannot-find-file-in-another-cocoapods-framework, but I don't understand how to make this work.

Anyone have suggestions?

Thanks,
Charles

Podspec update?

The current Cocoapod is fixed on AFNetworking 2.5.0 and I was curious if you had plan to push the updated podspec? We're using the BDBOAuth1Manager Coacopod and the v2.50 dependency locks us on that version. Not a huge issue and we can work around it but curious nonetheless. I'm assuming you are maintaining the podspec which may be a poor assumption.

Unauthorized when upload file

Hi, I'm trying to migrate the old code from RSOAuthEngine to BDBOAuth1Manager (1.5.0). The migration run smoothly with login, logout, POST, and GET.

The problem comes when I try to upload image to the server and get Request failed: unauthorized (401).

NSURLSessionDataTask *task = [_networkManager POST:URLString parameters:parameters constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {

        [formData appendPartWithFormData:imagedata name:imagekey];

    } success:^(NSURLSessionDataTask *task, id responseObject) {

        // Success 

    } failure:^(NSURLSessionDataTask *task, NSError *error) {

       // Fail
    }];

Bump to AFNetworking 2.1.x?

Could we bump the AFNetworking dependency to 2.1.x? I'm stuck using a forked version since I need some of the 2.1 functionality in my app.

Workspace files for working on the project

Hi there,

I would like to enhance the project in a few ways, but I noticed that there isn't any workspace/project files included. Can you please add them so that it is easy to work on the project?

Thanks,
Rudolph

Swift Package Manager support

This could support Swift Package Manager in a similar way to how AFNetworking does. This way, devs could consume this library using only tools built into Xcode, even if those devs don't use Swift

Prefix categories with bdb_ to help prevent possible conflicts

In the latest version, I changed the internal method names for categories to use a prefix, as Apple suggests. Due to the likely use of the [NSDictionary dictionaryFromQueryString:] method by users when handling authorization callback URLs via the AppDelegate's openURL: method, I decided not to prefix it until I release the next minor version.

Include of non-modular header inside framework module

Hi Brad

I have built a Cocoa Touch Framework written in Swift (using Xcode 7.2) utilising BDBOAuth1Manager 2.0.0 with no problem.

However, when I 'pod install' my aforementioned framework into a Swift standalone app (and as a result BDBOAuth1Manager gets installed as a dependency) I get the following errors when I try to build:

/Path/To/StandaloneApp/Pods/BDBOAuth1Manager/BDBOAuth1Manager/BDBOAuth1RequestSerializer.h:23:9: Include of non-modular header inside framework module 'BDBOAuth1Manager.BDBOAuth1RequestSerializer'

screen shot 2015-12-26 at 01 17 59

/Path/To/StandaloneApp/Pods/BDBOAuth1Manager/BDBOAuth1Manager/BDBOAuth1SessionManager.h:23:9: Include of non-modular header inside framework module 'BDBOAuth1Manager.BDBOAuth1SessionManager'

screen shot 2015-12-26 at 01 18 18

I've tried setting CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = 'YES', but didn't seem to help. I guess it wouldn't be an elegant solution anyway.

I've read through quite a few threads e.g 1 2 but couldn't really find a proper solution to my problem.

However, I came across this issue and the fix. I'm not sure if it's related but seems very much the same problem I'm facing.

Unfortunately, I know practically nothing about Obj C so can't really debug myself, but was wondering if you could look into this and perhaps give me some pointers if I could resolve this issue myself or does this require the same fix as the one for AFNetworking?

Or am I chasing a red herring?

Thanks

Cocoapods install wrong version

Hi,

For some reason I got 1.0.2 from cocoapods. I had to add repo addresss to Podfile to get 1.0.4.

On a separate note, I bumped into a trouble while debuging my code. If request token is already downloaded and app tries to download it again, it gives "Request failed: unauthorized (401)" error. It took me a while to figure out why I was getting this error. Did you considered adding a check to fetchRequestToken method? Smth like snippet bellow would help a lot:

if(self.isAuthorized){
    @throw([NSException exceptionWithName:@"Duplicate token request" reason:@"Can't fetch request token twice. Please deauthorize before fetching a new token" userInfo:nil]);
}

skip oauth_token

Is there a way to skip params["oauth_token"] even when a user has been authenticated?

OAuth signature is invalid for some providers

It seems that the OAuth signature is invalid for certain API providers. Not sure why it works for Twitter and not Copy, Bitbucket, Flickr, etc. I'll be looking into this problem later today.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.