Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Temporary fix for handling a user denying access for oauth #96

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AFOAuth1Client.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = "AFOAuth1Client"
s.version = "0.3.2"
s.version = "0.3.21"
s.summary = "AFNetworking Extension for OAuth 1.0a Authentication."
s.homepage = "https://github.com/AFNetworking/AFOAuth1Client"
s.license = 'MIT'
s.author = { 'Mattt Thompson' => 'm@mattt.me' }
s.source = { :git => "https://github.com/AFNetworking/AFOAuth1Client.git", :tag => '0.3.2' }
s.source = { :git => "git@github.com:mikekey/AFOAuth1Client.git", :tag => '0.3.21' }
s.source_files = 'AFOAuth1Client'
s.requires_arc = true

Expand All @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.7'
s.osx.frameworks = 'CoreServices', 'SystemConfiguration', 'Security'

s.dependency 'AFNetworking', '~> 1.3'
s.dependency 'AFNetworking', '~> 1.3.0'

s.prefix_header_contents = <<-EOS
#import <Availability.h>
Expand Down
4 changes: 4 additions & 0 deletions AFOAuth1Client/AFOAuth1Client.m
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ - (void)authorizeUsingOAuthWithRequestTokenPath:(NSString *)requestTokenPath

currentRequestToken.verifier = [AFParametersFromQueryString([url query]) valueForKey:@"oauth_verifier"];

if (currentRequestToken.verifier == nil) {
failure([NSError errorWithDomain:@"Oauth Authorization" code:401 userInfo:@{@"Access Denied":@"User denied access"}]);
return;
}
[self acquireOAuthAccessTokenWithPath:accessTokenPath requestToken:currentRequestToken accessMethod:accessMethod success:^(AFOAuth1Token * accessToken, id responseObject) {
self.applicationLaunchNotificationObserver = nil;
if (accessToken) {
Expand Down