My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Last 7 days

  • Dec 28, 2009
    MPOAuthMobile (Documentation of the MPOAuthMobile sample application for iP...) Wiki page commented on by ravibukka   -   When I am running MPOAuthMobile in iPhone simulator I am getting 10 errors 1) error: cannot find protocol declaration for 'MPOAuthAPIDelegate'(in MPOAuthMobileAppDelegate.h file) 2) error: 'MPOAuthNotificationRequestTokenReceived' undeclared (first use in this function) (in rootviewcontroller.m file) 3) error: request for member 'delegate' in something not a structure or union (in rootviewcontroller.m file) 4) and exit code with 1. etc.. Also some 6 files are missing in my application file structure. Help me in this regard.
    When I am running MPOAuthMobile in iPhone simulator I am getting 10 errors 1) error: cannot find protocol declaration for 'MPOAuthAPIDelegate'(in MPOAuthMobileAppDelegate.h file) 2) error: 'MPOAuthNotificationRequestTokenReceived' undeclared (first use in this function) (in rootviewcontroller.m file) 3) error: request for member 'delegate' in something not a structure or union (in rootviewcontroller.m file) 4) and exit code with 1. etc.. Also some 6 files are missing in my application file structure. Help me in this regard.

Last 30 days

  • Dec 21, 2009
    issue 5 (Unit Test: testWritingToAndReadingFromKeychain fails on PPC ...) Status changed by karl.adam   -  
    Status: Fixed
    Status: Fixed
  • Dec 21, 2009
    issue 20 (API does not allow for POST calls) commented on by martin.destagnol   -   Awesome Karl!
    Awesome Karl!
  • Dec 21, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) Status changed by karl.adam   -   Delete from Keychain fixed on iPhone
    Status: Fixed
    Delete from Keychain fixed on iPhone
    Status: Fixed
  • Dec 21, 2009
    issue 20 (API does not allow for POST calls) Status changed by karl.adam   -   POST methods added to MPOAuthAPI
    Status: Fixed
    POST methods added to MPOAuthAPI
    Status: Fixed
  • Dec 21, 2009
    r118 (- Fix Issue #5 - Just don't build PPC anymore, problem solve...) committed by karl.adam   -   - Fix Issue #5 - Just don't build PPC anymore, problem solved - Fix Issue #19 - Keychain code corrected for removing items - Fix Issue #20 - Oversight on my part that the high level MPOAuthAPI didn't provide an easy way to perform POST API methods - Fix some unit tests that were failing - Now 32/64 bit universal, armv6/armv7 universal - Now uses CommonCrypto framework for encryption on Mac and iPhone - OAuth behavior now seperated into its 2 component parts, getting an access token, and then using that access token - MPOAuthAuthenticationMethods created, OAuth and FourSquare's AuthExchange currently supported - Add support for username and password credentials - Add support for creating an MPOAuthURLRequest from a NSURLRequest
    - Fix Issue #5 - Just don't build PPC anymore, problem solved - Fix Issue #19 - Keychain code corrected for removing items - Fix Issue #20 - Oversight on my part that the high level MPOAuthAPI didn't provide an easy way to perform POST API methods - Fix some unit tests that were failing - Now 32/64 bit universal, armv6/armv7 universal - Now uses CommonCrypto framework for encryption on Mac and iPhone - OAuth behavior now seperated into its 2 component parts, getting an access token, and then using that access token - MPOAuthAuthenticationMethods created, OAuth and FourSquare's AuthExchange currently supported - Add support for username and password credentials - Add support for creating an MPOAuthURLRequest from a NSURLRequest
  • Dec 20, 2009
    issue 22 (Issue when buinding on 3.0) Status changed by karl.adam   -   This is actually wrong, the correct behavior is to use the already retrieved access token as that has been authorized by the user and remote server for making API requests. If you want to discard the credentials you can always call -discardCredentials on the MPOAuthAPI
    Status: Invalid
    This is actually wrong, the correct behavior is to use the already retrieved access token as that has been authorized by the user and remote server for making API requests. If you want to discard the credentials you can always call -discardCredentials on the MPOAuthAPI
    Status: Invalid
  • Dec 06, 2009
    issue 20 (API does not allow for POST calls) commented on by will.carter   -   thanks for this... btw, you can get rid of the complier error if you import MPURLRequestParameter.h
    thanks for this... btw, you can get rid of the complier error if you import MPURLRequestParameter.h
  • Dec 03, 2009
    MPOAuthMobile (Documentation of the MPOAuthMobile sample application for iP...) Wiki page commented on by reiner.p...@neofonie.de   -   @shawnb: I had the same error. Remove the files of MPWSLRDDiscoverer and MPWSXRDDocument, they are not needed by the engine.
    @shawnb: I had the same error. Remove the files of MPWSLRDDiscoverer and MPWSXRDDocument, they are not needed by the engine.

Older

  • Nov 26, 2009
    GettingStarted (Getting started with MPOAuthConnection) Wiki page commented on by nik.burns   -   We're using OAuth 1.0a, which moves the oauth_callback parameter to the requestToken endpoint. This avoids the man-in-the-middle attack on OAuth 1.0. The above was taken from the linkedin Api forums, has anyone got a version of mpoauthconnection that supports 1.0a? cheers Nik
    We're using OAuth 1.0a, which moves the oauth_callback parameter to the requestToken endpoint. This avoids the man-in-the-middle attack on OAuth 1.0. The above was taken from the linkedin Api forums, has anyone got a version of mpoauthconnection that supports 1.0a? cheers Nik
  • Nov 25, 2009
    issue 22 (Issue when buinding on 3.0) reported by tvgece   -   What steps will reproduce the problem? 1. Build app using 3.0 2. authorise with some network 3. close the app and open it. its not requesting again instead it calling access token What is the expected output? What do you see instead? i expect it to fetch new unauthorised request token and ask user for authentication What version of the product are you using? On what operating system? 3.0 Please provide any additional information below. I think problem with key chain
    What steps will reproduce the problem? 1. Build app using 3.0 2. authorise with some network 3. close the app and open it. its not requesting again instead it calling access token What is the expected output? What do you see instead? i expect it to fetch new unauthorised request token and ask user for authentication What version of the product are you using? On what operating system? 3.0 Please provide any additional information below. I think problem with key chain
  • Oct 18, 2009
    MPOAuthMobile (Documentation of the MPOAuthMobile sample application for iP...) Wiki page commented on by shawnb   -   I have the Security framework. I guess I just want to know how to use this. The documentation is horrific. Two lines of code? Come on, that's not right.
    I have the Security framework. I guess I just want to know how to use this. The documentation is horrific. Two lines of code? Come on, that's not right.
  • Oct 14, 2009
    MPOAuthMobile (Documentation of the MPOAuthMobile sample application for iP...) Wiki page commented on by xmmstru   -   try to add the security framework to your project. that fixed it for me.
    try to add the security framework to your project. that fixed it for me.
  • Oct 13, 2009
    MPOAuthMobile (Documentation of the MPOAuthMobile sample application for iP...) Wiki page commented on by shawnb   -   Has this even been tested on the iPhone. I tried adding the classes (and necessary frameworks) to my iPhone project and the classes don't even compile. 17 errors. What's going on? Can't you guys just provide us with a framework or a .o file like everyone else does?
    Has this even been tested on the iPhone. I tried adding the classes (and necessary frameworks) to my iPhone project and the classes don't even compile. 17 errors. What's going on? Can't you guys just provide us with a framework or a .o file like everyone else does?
  • Sep 03, 2009
    MPOAuthMobile (Documentation of the MPOAuthMobile sample application for iP...) Wiki page commented on by godzirra   -   Have you had any luck with MPOAuthMobile on the newest SDK with Snow Leopard? It crashes every time I try and run it on the simulator.
    Have you had any luck with MPOAuthMobile on the newest SDK with Snow Leopard? It crashes every time I try and run it on the simulator.
  • Aug 27, 2009
    GettingStarted (Getting started with MPOAuthConnection) Wiki page commented on by godzirra   -   I've setup a new project, imported the MPOAuth classes into their own group, setup my secret and consumer key, and I've setup my code like this: - (void)viewDidAppear:(BOOL)animated { NSDictionary *credentials = [NSDictionary dictionaryWithObjectsAndKeys: kConsumerKey, kMPOAuthCredentialConsumerKey, kConsumerSecret, kMPOAuthCredentialConsumerSecret, nil]; _oauthAPI = [[MPOAuthAPI alloc] initWithCredentials:credentials authenticationURL:[NSURL URLWithString:@"https://www.domain.com/oauth/authorize"] andBaseURL:[NSURL URLWithString:@"http://www.domain.com/oauth/request_token"]]; _oauthAPI.delegate = (id <MPOAuthAPIDelegate>)[UIApplication sharedApplication].delegate; } This is definitely not working. I'm not sure what I'm supposed to be using as BaseUrl.
    I've setup a new project, imported the MPOAuth classes into their own group, setup my secret and consumer key, and I've setup my code like this: - (void)viewDidAppear:(BOOL)animated { NSDictionary *credentials = [NSDictionary dictionaryWithObjectsAndKeys: kConsumerKey, kMPOAuthCredentialConsumerKey, kConsumerSecret, kMPOAuthCredentialConsumerSecret, nil]; _oauthAPI = [[MPOAuthAPI alloc] initWithCredentials:credentials authenticationURL:[NSURL URLWithString:@"https://www.domain.com/oauth/authorize"] andBaseURL:[NSURL URLWithString:@"http://www.domain.com/oauth/request_token"]]; _oauthAPI.delegate = (id <MPOAuthAPIDelegate>)[UIApplication sharedApplication].delegate; } This is definitely not working. I'm not sure what I'm supposed to be using as BaseUrl.
  • Aug 25, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by desiguy421   -   Thanks ceder, that did the trick for me.
    Thanks ceder, that did the trick for me.
  • Aug 23, 2009
    MPOAuthClient (Documentation of the MPOAuthClient sample application includ...) Wiki page commented on by dvanbrunt   -   Can someone fill in what a proper request in "MPOAuthClient" would look like including querystring parameters just before hitting the "Perform Method" button an send me a screen shot? That might work wonders on breaking through my mind block. Cheers, D
    Can someone fill in what a proper request in "MPOAuthClient" would look like including querystring parameters just before hitting the "Perform Method" button an send me a screen shot? That might work wonders on breaking through my mind block. Cheers, D
  • Aug 23, 2009
    MPOAuthClient (Documentation of the MPOAuthClient sample application includ...) Wiki page commented on by dvanbrunt   -   My question is regarding how requests are formated once an access token is received. I'm trying to create an api secured with oauth much like flickr's. As is flickr's ...I'd like for my requests to contain the method as var. Eg. http://www.domain.com/services/rest/?method=domain.users.getUser&user_id=1 Using "MPOAuthClient" I can successfully get an access token from "my" server but then I enter the above url into the "method" field of "MPOAuthClient" and hit "Perform Method" button...to which I just get an oAuth error: "Can't verify request, missing oauth_consumer_key or oauth_token" looking at the network request it looks like it is broken by the querystring being inserted before the "?": http://www.domain.com/index.php/services/rest/method=domain.users.getUser&id=1?oauth_consumer_key=bd4755d1f742d206d9252ce9d33925c504a8df833&oauth_nonce=27F02790-36B4-4EC0-88C4-11CD4C81AE1B&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1251056077&oauth_token=99d4e4fe2269b564bcb4babaa5b5275b04a91996f&oauth_version=1.0&oauth_signature=gLbyamMuQ45V%2Bc0U0hW%2Fyr1g0HQ%3D Isn't what I put in the method field supposed to be signed into the request? Unfortunately, I'm a little lost as to how to make this happen or if its against the design of MPOAuth or even oAuth in general. Can anyone clarify?
    My question is regarding how requests are formated once an access token is received. I'm trying to create an api secured with oauth much like flickr's. As is flickr's ...I'd like for my requests to contain the method as var. Eg. http://www.domain.com/services/rest/?method=domain.users.getUser&user_id=1 Using "MPOAuthClient" I can successfully get an access token from "my" server but then I enter the above url into the "method" field of "MPOAuthClient" and hit "Perform Method" button...to which I just get an oAuth error: "Can't verify request, missing oauth_consumer_key or oauth_token" looking at the network request it looks like it is broken by the querystring being inserted before the "?": http://www.domain.com/index.php/services/rest/method=domain.users.getUser&id=1?oauth_consumer_key=bd4755d1f742d206d9252ce9d33925c504a8df833&oauth_nonce=27F02790-36B4-4EC0-88C4-11CD4C81AE1B&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1251056077&oauth_token=99d4e4fe2269b564bcb4babaa5b5275b04a91996f&oauth_version=1.0&oauth_signature=gLbyamMuQ45V%2Bc0U0hW%2Fyr1g0HQ%3D Isn't what I put in the method field supposed to be signed into the request? Unfortunately, I'm a little lost as to how to make this happen or if its against the design of MPOAuth or even oAuth in general. Can anyone clarify?
  • Aug 23, 2009
    MPOAuthClient (Documentation of the MPOAuthClient sample application includ...) Wiki page commented on by dvanbrunt   -   My question is regarding how requests are formated once an access token is received. I'm trying to create an api secured with oauth much like flickr's. As is flickr's ...I'd like for my requests to contain the method as var. Eg. http://www.domain.com/services/rest/?method=domain.users.getUser&user_id=1 Using "MPOAuthClient" I can successfully get an access token from "my" server but then I enter the above url into the "method" field of "MPOAuthClient" and hit "Perform Method" button...to which I just get an oAuth error: "Can't verify request, missing oauth_consumer_key or oauth_token" looking at the network request it looks like it is broken with too many "?"s: http://www.domain.com/index.php/services/rest/method=domain.users.getUser&id=1?oauth_consumer_key=bd4755d1f742d206d9252ce9d33925c504a8df833&oauth_nonce=27F02790-36B4-4EC0-88C4-11CD4C81AE1B&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1251056077&oauth_token=99d4e4fe2269b564bcb4babaa5b5275b04a91996f&oauth_version=1.0&oauth_signature=gLbyamMuQ45V%2Bc0U0hW%2Fyr1g0HQ%3D Isn't what I put in the method field supposed to be signed into the request? Unfortunately, I'm a little lost as to how to make this happen or if its against the design of MPOAuth or even oAuth in general. Can anyone clarify?
    My question is regarding how requests are formated once an access token is received. I'm trying to create an api secured with oauth much like flickr's. As is flickr's ...I'd like for my requests to contain the method as var. Eg. http://www.domain.com/services/rest/?method=domain.users.getUser&user_id=1 Using "MPOAuthClient" I can successfully get an access token from "my" server but then I enter the above url into the "method" field of "MPOAuthClient" and hit "Perform Method" button...to which I just get an oAuth error: "Can't verify request, missing oauth_consumer_key or oauth_token" looking at the network request it looks like it is broken with too many "?"s: http://www.domain.com/index.php/services/rest/method=domain.users.getUser&id=1?oauth_consumer_key=bd4755d1f742d206d9252ce9d33925c504a8df833&oauth_nonce=27F02790-36B4-4EC0-88C4-11CD4C81AE1B&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1251056077&oauth_token=99d4e4fe2269b564bcb4babaa5b5275b04a91996f&oauth_version=1.0&oauth_signature=gLbyamMuQ45V%2Bc0U0hW%2Fyr1g0HQ%3D Isn't what I put in the method field supposed to be signed into the request? Unfortunately, I'm a little lost as to how to make this happen or if its against the design of MPOAuth or even oAuth in general. Can anyone clarify?
  • Aug 23, 2009
    MPOAuthClient (Documentation of the MPOAuthClient sample application includ...) Wiki page commented on by dvanbrunt   -   My question is regarding how requests are formated once an access token is received. I'm trying to create an api secured with oauth much like flickr's. As is flickr's ...I'd like for my requests to contain the method as var. Eg. http://www.domain.com/services/rest/?method=domain.users.getUser&user_id=1 Using "MPOAuthClient" I can successfully get an access token from "my" server but then I enter the above url into the "method" field of "MPOAuthClient" and hit "Perform Method" button...to which I just get an oAuth error: "Can't verify request, missing oauth_consumer_key or oauth_token" looking at the network request it looks broken: http://www.domain.com/index.php/services/rest/method=domain.users.getUser&id=1?oauth_consumer_key=bd4755d1f742d206d9252ce9d33925c504a8df833&oauth_nonce=27F02790-36B4-4EC0-88C4-11CD4C81AE1B&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1251056077&oauth_token=99d4e4fe2269b564bcb4babaa5b5275b04a91996f&oauth_version=1.0&oauth_signature=gLbyamMuQ45V%2Bc0U0hW%2Fyr1g0HQ%3D Isn't what I put in the method field supposed to be signed into the request? Unfortunately, I'm a little lost as to how to make this happen or if its against the design of MPOAuth or even oAuth in general. Can anyone clarify?
    My question is regarding how requests are formated once an access token is received. I'm trying to create an api secured with oauth much like flickr's. As is flickr's ...I'd like for my requests to contain the method as var. Eg. http://www.domain.com/services/rest/?method=domain.users.getUser&user_id=1 Using "MPOAuthClient" I can successfully get an access token from "my" server but then I enter the above url into the "method" field of "MPOAuthClient" and hit "Perform Method" button...to which I just get an oAuth error: "Can't verify request, missing oauth_consumer_key or oauth_token" looking at the network request it looks broken: http://www.domain.com/index.php/services/rest/method=domain.users.getUser&id=1?oauth_consumer_key=bd4755d1f742d206d9252ce9d33925c504a8df833&oauth_nonce=27F02790-36B4-4EC0-88C4-11CD4C81AE1B&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1251056077&oauth_token=99d4e4fe2269b564bcb4babaa5b5275b04a91996f&oauth_version=1.0&oauth_signature=gLbyamMuQ45V%2Bc0U0hW%2Fyr1g0HQ%3D Isn't what I put in the method field supposed to be signed into the request? Unfortunately, I'm a little lost as to how to make this happen or if its against the design of MPOAuth or even oAuth in general. Can anyone clarify?
  • Jul 02, 2009
    issue 20 (API does not allow for POST calls) commented on by jason.huffman   -   Found "POST" logic already in MPOAuthURLRequest (as indicated by other posters), so I altered the following in MPOAuthAPI (not the most elegant, but perhaps least invasive to callee methods - note previous deleted post had a defect): BEFORE: - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction { if (!inMethod && ![inURL path] && ![inURL query]) { [NSException raise:@"MPOAuthNilMethodRequestException" format:@"Nil was passed as the method to be performed on %@", inURL]; } NSURL *requestURL = inMethod ? [NSURL URLWithString:inMethod relativeToURL:inURL] : inURL; MPOAuthURLRequest *aRequest = [[MPOAuthURLRequest alloc] initWithURL:requestURL andParameters:inParameters]; AFTER: - (void)performMethod:(NSString *)inMethod withTarget:(id)inTarget andAction:(SEL)inAction doPost:(BOOL)inPost { [self performMethod:inMethod atURL:self.baseURL withParameters:nil withTarget:inTarget andAction:inAction doPost:inPost]; } - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction { [self performMethod:inMethod atURL:inURL withParameters:inParameters withTarget:inTarget andAction:inAction doPost:NO]; } - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction doPost:(BOOL)inPost { if (!inMethod && ![inURL path] && ![inURL query]) { [NSException raise:@"MPOAuthNilMethodRequestException" format:@"Nil was passed as the method to be performed on %@", inURL]; } NSURL *requestURL = inMethod ? [NSURL URLWithString:inMethod relativeToURL:inURL] : inURL; MPOAuthURLRequest *aRequest = [[MPOAuthURLRequest alloc] initWithURL:requestURL andParameters:inParameters]; if (inPost) aRequest.HTTPMethod = @"POST"; Tried the following code, and it appeared to work for me (had compiler warning, but I found +parametersFromString defined so I didn't spend much time tracking down the issue): NSArray *array = [MPURLRequestParameter parametersFromString:@"status=Mr. Watson--come here--I want to see you."]; [_oauthAPI performMethod:@"statuses/update.json" atURL:_oauthAPI.baseURL withParameters:array withTarget:self andAction:@selector(_confirmPost:withResponseString:) doPost:YES];
    Found "POST" logic already in MPOAuthURLRequest (as indicated by other posters), so I altered the following in MPOAuthAPI (not the most elegant, but perhaps least invasive to callee methods - note previous deleted post had a defect): BEFORE: - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction { if (!inMethod && ![inURL path] && ![inURL query]) { [NSException raise:@"MPOAuthNilMethodRequestException" format:@"Nil was passed as the method to be performed on %@", inURL]; } NSURL *requestURL = inMethod ? [NSURL URLWithString:inMethod relativeToURL:inURL] : inURL; MPOAuthURLRequest *aRequest = [[MPOAuthURLRequest alloc] initWithURL:requestURL andParameters:inParameters]; AFTER: - (void)performMethod:(NSString *)inMethod withTarget:(id)inTarget andAction:(SEL)inAction doPost:(BOOL)inPost { [self performMethod:inMethod atURL:self.baseURL withParameters:nil withTarget:inTarget andAction:inAction doPost:inPost]; } - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction { [self performMethod:inMethod atURL:inURL withParameters:inParameters withTarget:inTarget andAction:inAction doPost:NO]; } - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction doPost:(BOOL)inPost { if (!inMethod && ![inURL path] && ![inURL query]) { [NSException raise:@"MPOAuthNilMethodRequestException" format:@"Nil was passed as the method to be performed on %@", inURL]; } NSURL *requestURL = inMethod ? [NSURL URLWithString:inMethod relativeToURL:inURL] : inURL; MPOAuthURLRequest *aRequest = [[MPOAuthURLRequest alloc] initWithURL:requestURL andParameters:inParameters]; if (inPost) aRequest.HTTPMethod = @"POST"; Tried the following code, and it appeared to work for me (had compiler warning, but I found +parametersFromString defined so I didn't spend much time tracking down the issue): NSArray *array = [MPURLRequestParameter parametersFromString:@"status=Mr. Watson--come here--I want to see you."]; [_oauthAPI performMethod:@"statuses/update.json" atURL:_oauthAPI.baseURL withParameters:array withTarget:self andAction:@selector(_confirmPost:withResponseString:) doPost:YES];
  • Jul 02, 2009
    issue 20 (API does not allow for POST calls) commented on by jason.huffman   -   Found "POST" logic already in MPOAuthURLRequest, so I altered the following in MPOAuthAPI (not the most elegant, but perhaps least invasive to callee methods): BEFORE: - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction { if (!inMethod && ![inURL path] && ![inURL query]) { [NSException raise:@"MPOAuthNilMethodRequestException" format:@"Nil was passed as the method to be performed on %@", inURL]; } NSURL *requestURL = inMethod ? [NSURL URLWithString:inMethod relativeToURL:inURL] : inURL; MPOAuthURLRequest *aRequest = [[MPOAuthURLRequest alloc] initWithURL:requestURL andParameters:inParameters]; AFTER: - (void)performMethod:(NSString *)inMethod withTarget:(id)inTarget andAction:(SEL)inAction doPost:(BOOL)inPost { [self performMethod:inMethod atURL:self.baseURL withParameters:nil withTarget:inTarget andAction:inAction doPost:inPost]; } - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction { [self performMethod:inMethod atURL:self.baseURL withParameters:inParameters withTarget:inTarget andAction:inAction doPost:NO]; } - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction doPost:(BOOL)inPost { if (!inMethod && ![inURL path] && ![inURL query]) { [NSException raise:@"MPOAuthNilMethodRequestException" format:@"Nil was passed as the method to be performed on %@", inURL]; } NSURL *requestURL = inMethod ? [NSURL URLWithString:inMethod relativeToURL:inURL] : inURL; MPOAuthURLRequest *aRequest = [[MPOAuthURLRequest alloc] initWithURL:requestURL andParameters:inParameters]; if (inPost) aRequest.HTTPMethod = @"POST"; Tried the following code, and it appeared to work for me (had compiler warning for me, and I found +parametersFromString defined so I didn't spend much time tracking down the issue): NSArray *array = [MPURLRequestParameter parametersFromString:@"status=Mr. Watson--come here--I want to see you."]; [_oauthAPI performMethod:@"statuses/update.json" atURL:_oauthAPI.baseURL withParameters:array withTarget:self andAction:@selector(_confirmPost:withResponseString:) doPost:YES];
    Found "POST" logic already in MPOAuthURLRequest, so I altered the following in MPOAuthAPI (not the most elegant, but perhaps least invasive to callee methods): BEFORE: - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction { if (!inMethod && ![inURL path] && ![inURL query]) { [NSException raise:@"MPOAuthNilMethodRequestException" format:@"Nil was passed as the method to be performed on %@", inURL]; } NSURL *requestURL = inMethod ? [NSURL URLWithString:inMethod relativeToURL:inURL] : inURL; MPOAuthURLRequest *aRequest = [[MPOAuthURLRequest alloc] initWithURL:requestURL andParameters:inParameters]; AFTER: - (void)performMethod:(NSString *)inMethod withTarget:(id)inTarget andAction:(SEL)inAction doPost:(BOOL)inPost { [self performMethod:inMethod atURL:self.baseURL withParameters:nil withTarget:inTarget andAction:inAction doPost:inPost]; } - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction { [self performMethod:inMethod atURL:self.baseURL withParameters:inParameters withTarget:inTarget andAction:inAction doPost:NO]; } - (void)performMethod:(NSString *)inMethod atURL:(NSURL *)inURL withParameters:(NSArray *)inParameters withTarget:(id)inTarget andAction:(SEL)inAction doPost:(BOOL)inPost { if (!inMethod && ![inURL path] && ![inURL query]) { [NSException raise:@"MPOAuthNilMethodRequestException" format:@"Nil was passed as the method to be performed on %@", inURL]; } NSURL *requestURL = inMethod ? [NSURL URLWithString:inMethod relativeToURL:inURL] : inURL; MPOAuthURLRequest *aRequest = [[MPOAuthURLRequest alloc] initWithURL:requestURL andParameters:inParameters]; if (inPost) aRequest.HTTPMethod = @"POST"; Tried the following code, and it appeared to work for me (had compiler warning for me, and I found +parametersFromString defined so I didn't spend much time tracking down the issue): NSArray *array = [MPURLRequestParameter parametersFromString:@"status=Mr. Watson--come here--I want to see you."]; [_oauthAPI performMethod:@"statuses/update.json" atURL:_oauthAPI.baseURL withParameters:array withTarget:self andAction:@selector(_confirmPost:withResponseString:) doPost:YES];
  • Jul 02, 2009
    issue 20 (API does not allow for POST calls) commented on by martin.destagnol   -   How can this Issue priority set to Medium? Without POST, this code is not usable in 99.99% of APIs! Or do I miss something?
    How can this Issue priority set to Medium? Without POST, this code is not usable in 99.99% of APIs! Or do I miss something?
  • Jul 01, 2009
    issue 20 (API does not allow for POST calls) commented on by bonczek   -   I have a really quick and dirty solution for this... not the best solution since I'm not too familiar with the API but does work for POST calls. Would love to work on the "correct" fix.. just need a little guidance from the devs.
    I have a really quick and dirty solution for this... not the best solution since I'm not too familiar with the API but does work for POST calls. Would love to work on the "correct" fix.. just need a little guidance from the devs.
  • Jun 08, 2009
    issue 20 (API does not allow for POST calls) commented on by neilpep   -   Has anyone managed to execute a POST yet, only needed his API to update twitter statusus at the moment and that requires a POST, be a shame if i can't do it now I have integrated into my app. Thanks Manny
    Has anyone managed to execute a POST yet, only needed his API to update twitter statusus at the moment and that requires a POST, be a shame if i can't do it now I have integrated into my app. Thanks Manny
  • May 30, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by ceder666   -   Fixed up the remove function to work on removing a single item. - (void)removeValueFromKeychainUsingName:(NSString *)inName { #if 0 NSMutableDictionary *aKeychainItem = nil; [self findValueFromKeychainUsingName:inName returningItem:&aKeychainItem]; if (aKeychainItem) { SecItemDelete((CFDictionaryRef)aKeychainItem); } #else OSStatus status = noErr; NSString *serverName = [_baseURL host]; NSString *securityDomain = [_authenticationURL host]; NSMutableDictionary *searchDictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:(id)kSecClassInternetPassword, (id)kSecClass, securityDomain, (id)kSecAttrSecurityDomain, serverName, (id)kSecAttrServer, inName, (id)kSecAttrAccount, nil]; status = SecItemDelete((CFDictionaryRef)searchDictionary); fprintf( stderr, "Remove ItemDelete :: code = %d\n", status ); #endif }
    Fixed up the remove function to work on removing a single item. - (void)removeValueFromKeychainUsingName:(NSString *)inName { #if 0 NSMutableDictionary *aKeychainItem = nil; [self findValueFromKeychainUsingName:inName returningItem:&aKeychainItem]; if (aKeychainItem) { SecItemDelete((CFDictionaryRef)aKeychainItem); } #else OSStatus status = noErr; NSString *serverName = [_baseURL host]; NSString *securityDomain = [_authenticationURL host]; NSMutableDictionary *searchDictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:(id)kSecClassInternetPassword, (id)kSecClass, securityDomain, (id)kSecAttrSecurityDomain, serverName, (id)kSecAttrServer, inName, (id)kSecAttrAccount, nil]; status = SecItemDelete((CFDictionaryRef)searchDictionary); fprintf( stderr, "Remove ItemDelete :: code = %d\n", status ); #endif }
  • May 29, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by ceder666   -   I made up a function that does what I need, delete the keychain. Trying to Delete with the Results Dictionary is wrong. And the searchDictionary with the extra fields didn't work either. I didn't try just deleting a single item. - (void)clearKeychain { OSStatus status = noErr; NSString *serverName = [_baseURL host]; NSString *securityDomain = [_authenticationURL host]; //NSMutableDictionary *attributesDictionary = nil; NSMutableDictionary *searchDictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:(id)kSecClassInternetPassword, (id)kSecClass, securityDomain, (id)kSecAttrSecurityDomain, serverName, (id)kSecAttrServer, nil]; status = SecItemDelete((CFDictionaryRef)searchDictionary); fprintf( stderr, "ItemDelete :: code = %d\n", status ); }
    I made up a function that does what I need, delete the keychain. Trying to Delete with the Results Dictionary is wrong. And the searchDictionary with the extra fields didn't work either. I didn't try just deleting a single item. - (void)clearKeychain { OSStatus status = noErr; NSString *serverName = [_baseURL host]; NSString *securityDomain = [_authenticationURL host]; //NSMutableDictionary *attributesDictionary = nil; NSMutableDictionary *searchDictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:(id)kSecClassInternetPassword, (id)kSecClass, securityDomain, (id)kSecAttrSecurityDomain, serverName, (id)kSecAttrServer, nil]; status = SecItemDelete((CFDictionaryRef)searchDictionary); fprintf( stderr, "ItemDelete :: code = %d\n", status ); }
  • May 28, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by ceder666   -   SecItemDelete is returning this err code: errSecParam -50 One or more parameters passed to a function were not valid. I wish I wasn't a Keychain newbie.
    SecItemDelete is returning this err code: errSecParam -50 One or more parameters passed to a function were not valid. I wish I wasn't a Keychain newbie.
  • May 28, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by ceder666   -   I deleted my comment on Mutable Dictionary, as it wasn't a fix. The discardServerCredentials only works in that it sets nil in the local _store in _credentials. In the Keychain environment, the values are persisting; so upon the next launch of the app, the old values are read in. This is an issue that I'll be forced to keep looking at until I find an answer. It seems like an important requirement to be able to "Logout". As well, I can't test my app if I can't start from a clean slate. It looks like I will be learning a little bit more than I was hoping ;)
    I deleted my comment on Mutable Dictionary, as it wasn't a fix. The discardServerCredentials only works in that it sets nil in the local _store in _credentials. In the Keychain environment, the values are persisting; so upon the next launch of the app, the old values are read in. This is an issue that I'll be forced to keep looking at until I find an answer. It seems like an important requirement to be able to "Logout". As well, I can't test my app if I can't start from a clean slate. It looks like I will be learning a little bit more than I was hoping ;)
  • May 28, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by m...@danilocampos.com   -   As of r117 this was still an issue for me. Worked around it because I had to move on, but yeah, if ceder666's fix works, probably be good to roll that into the next commit.
    As of r117 this was still an issue for me. Worked around it because I had to move on, but yeah, if ceder666's fix works, probably be good to roll that into the next commit.
  • May 28, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by karl.adam   -   I'm pretty sure this bug has been fixed before this change just I'd forgotten to close the ticket. I recall talking to Danilo Campos about it directly after I'd fixed it. I should have added a unit test to verify but I'll go ahead and add some code to make all the unit tests run on the device as well to ensure that this bug has been fixed before closing this since my recollection here is hazy.
    I'm pretty sure this bug has been fixed before this change just I'd forgotten to close the ticket. I recall talking to Danilo Campos about it directly after I'd fixed it. I should have added a unit test to verify but I'll go ahead and add some code to make all the unit tests run on the device as well to ensure that this bug has been fixed before closing this since my recollection here is hazy.
  • May 28, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by ceder666   -   I found a fix for this: In MPOAuthAPI+KeychainAdditionsiPhone.m in function "removeValueFromKeychainUsingName" Change the first line from: NSDictionary *aKeychainItem = NULL; to: NSMutableDictionary *aKeychainItem = NULL; And items will actually get deleted. I guess the iPhone is being very strict about what a *non* Mutable Dictionary can get set to after it's put on the stack as a NULL.
    I found a fix for this: In MPOAuthAPI+KeychainAdditionsiPhone.m in function "removeValueFromKeychainUsingName" Change the first line from: NSDictionary *aKeychainItem = NULL; to: NSMutableDictionary *aKeychainItem = NULL; And items will actually get deleted. I guess the iPhone is being very strict about what a *non* Mutable Dictionary can get set to after it's put on the stack as a NULL.
  • May 27, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) commented on by ceder666   -   I found a fix for this: In MPOAuthAPI+KeychainAdditionsiPhone.m in function "removeValueFromKeychainUsingName" Change the first line from: NSDictionary *aKeychainItem = NULL; to: NSMutableDictionary *aKeychainItem = NULL; And items will actually get deleted. I guess the iPhone is being very strict about what a Mutable Dictionary can get set to after it's put on the stack as a NULL.
    I found a fix for this: In MPOAuthAPI+KeychainAdditionsiPhone.m in function "removeValueFromKeychainUsingName" Change the first line from: NSDictionary *aKeychainItem = NULL; to: NSMutableDictionary *aKeychainItem = NULL; And items will actually get deleted. I guess the iPhone is being very strict about what a Mutable Dictionary can get set to after it's put on the stack as a NULL.
  • May 25, 2009
    issue 20 (API does not allow for POST calls) commented on by bmcdade   -   Ahhhhhhh.. This has been driving me nuts.. I just thought I was stupid and couldn't figure out how to set the post method. Any ETA on when this would be added as I would really like the use the API but I need it for POST not just GET.
    Ahhhhhhh.. This has been driving me nuts.. I just thought I was stupid and couldn't figure out how to set the post method. Any ETA on when this would be added as I would really like the use the API but I need it for POST not just GET.
  • May 20, 2009
    issue 21 (Update copyright and license infromation in header comments.) reported by vpmtllc   -   What steps will reproduce the problem? 1. Look at source code header comments. 2. In many of the files, read "Copyright 2008 matrixPointer. All rights reserved." What is the expected output? What do you see instead? Standard New BSD License header comment. What version of the product are you using? On what operating system? OS X. Please provide any additional information below. Filed issue as requested... :-)
    What steps will reproduce the problem? 1. Look at source code header comments. 2. In many of the files, read "Copyright 2008 matrixPointer. All rights reserved." What is the expected output? What do you see instead? Standard New BSD License header comment. What version of the product are you using? On what operating system? OS X. Please provide any additional information below. Filed issue as requested... :-)
  • Apr 30, 2009
    issue 20 (API does not allow for POST calls) reported by jlee0831   -   Although there is code in MPOAuthURLRequest that deals with POST calls, there is no way to set the HTTPMethod via the API, as it is abstracted behind MPOAuthURLRequest which is allocated inside of the performMethod: method inside MPOAuthAPI.
    Although there is code in MPOAuthURLRequest that deals with POST calls, there is no way to set the HTTPMethod via the API, as it is abstracted behind MPOAuthURLRequest which is allocated inside of the performMethod: method inside MPOAuthAPI.
  • Apr 21, 2009
    issue 19 (Discard credentials restarts OAuth dance but old credentials...) reported by m...@danilocampos.com   -   Slight PITA: my OAuth service provider discourages use of a webview and I'm trying to play nice with them. What steps will reproduce the problem? 1. Authenticate app using Account A 2. Call discardCredentials and re-authenticate using Account B, launching Safari and quitting the app. What is the expected output? What do you see instead? Expect to see Account B data in the app, but Account A is still there What version of the product are you using? Using r117 Please provide any additional information below. This feels like an issue with the keychain wrapper: the only way to truly start afresh without the webview is to restore the device or change the app's bundle identifier, giving it access to a clean Keychain slate.
    Slight PITA: my OAuth service provider discourages use of a webview and I'm trying to play nice with them. What steps will reproduce the problem? 1. Authenticate app using Account A 2. Call discardCredentials and re-authenticate using Account B, launching Safari and quitting the app. What is the expected output? What do you see instead? Expect to see Account B data in the app, but Account A is still there What version of the product are you using? Using r117 Please provide any additional information below. This feels like an issue with the keychain wrapper: the only way to truly start afresh without the webview is to restore the device or change the app's bundle identifier, giving it access to a clean Keychain slate.
  • Apr 16, 2009
    issue 18 (Problem building example) Status changed by karl.adam   -   Fixed in r117
    Status: Fixed
    Fixed in r117
    Status: Fixed
  • Apr 16, 2009
    r117 (- Fix Issue #18 and remove some build warnings around the XR...) committed by karl.adam   -   - Fix Issue #18 and remove some build warnings around the XRD code
    - Fix Issue #18 and remove some build warnings around the XRD code
  • Apr 16, 2009
    issue 18 (Problem building example) commented on by karl.adam   -   What OS version are you at? What version of Xcode and gcc? libxml should be included with your system
    What OS version are you at? What version of Xcode and gcc? libxml should be included with your system
  • Apr 16, 2009
    issue 18 (Problem building example) reported by vgraupera   -   I downloaded the code from svn. I am having trouble building it. _xmlXPathNewContext, _xmlFreeDoc, _xmlXPathFreeObject, etc. are not resolved at link time. Is there a framework missing from the project file, or some libxml that I have to set up and install on my mac for it to build? Thanks.
    I downloaded the code from svn. I am having trouble building it. _xmlXPathNewContext, _xmlFreeDoc, _xmlXPathFreeObject, etc. are not resolved at link time. Is there a framework missing from the project file, or some libxml that I have to set up and install on my mac for it to build? Thanks.
  • Apr 13, 2009
    r116 (- Fix authenticationState and make -discardServerCredentials...) committed by karl.adam   -   - Fix authenticationState and make -discardServerCredentials effective immediately instead of on next launch
    - Fix authenticationState and make -discardServerCredentials effective immediately instead of on next launch
  • Apr 12, 2009
    issue 17 (Flush keychain and restore authentication state to fresh-out...) Status changed by karl.adam   -  
    Status: Fixed
    Status: Fixed
  • Apr 12, 2009
    issue 16 (Fix compiling in Simulator for iPhone OS 3.0) Status changed by karl.adam   -  
    Status: Fixed
    Status: Fixed
  • Apr 12, 2009
    issue 13 (check if the user is already authenticated) Status changed by karl.adam   -  
    Status: Fixed
    Status: Fixed
  • Apr 12, 2009
    r115 (- minor project changes for the previous commit) committed by karl.adam   -   - minor project changes for the previous commit
    - minor project changes for the previous commit
  • Apr 12, 2009
    r114 (- Fixes for Issues #13, #16, and #17) committed by karl.adam   -   - Fixes for Issues #13, #16, and #17
    - Fixes for Issues #13, #16, and #17
  • Apr 11, 2009
    issue 13 (check if the user is already authenticated) commented on by m...@danilocampos.com   -   Through some testing in Simulator, which allows an easy wipe of keychain contents, this method seems to work for me: - (BOOL)userHasAuthenticated { if ([self findValueFromKeychainUsingName:@"oauth_token_access_secret"] == nil) { return NO; } else { return YES; } }
    Through some testing in Simulator, which allows an easy wipe of keychain contents, this method seems to work for me: - (BOOL)userHasAuthenticated { if ([self findValueFromKeychainUsingName:@"oauth_token_access_secret"] == nil) { return NO; } else { return YES; } }
  • Apr 10, 2009
    issue 17 (Flush keychain and restore authentication state to fresh-out...) commented on by weebmac   -   Dove into the code and took a stab at writing the method that might do this: - (void)flushCredentials { [self removeValueFromKeychainUsingName:@"oauth_token_request"]; [self removeValueFromKeychainUsingName:@"oauth_token_request_secret"]; [self removeValueFromKeychainUsingName:@"oauth_token_access"]; [self removeValueFromKeychainUsingName:@"oauth_token_access_secret"]; [self removeValueFromKeychainUsingName:@"oauth_session_handle"]; } Even calling this method before the meat of initWithCredentials was run didn't seem to reset the authentication state. Any guess where I'm going wrong here?
    Dove into the code and took a stab at writing the method that might do this: - (void)flushCredentials { [self removeValueFromKeychainUsingName:@"oauth_token_request"]; [self removeValueFromKeychainUsingName:@"oauth_token_request_secret"]; [self removeValueFromKeychainUsingName:@"oauth_token_access"]; [self removeValueFromKeychainUsingName:@"oauth_token_access_secret"]; [self removeValueFromKeychainUsingName:@"oauth_session_handle"]; } Even calling this method before the meat of initWithCredentials was run didn't seem to reset the authentication state. Any guess where I'm going wrong here?
 
Hosted by Google Code