Skip to content

Commit

Permalink
Fixed bug where state wasn't used.
Browse files Browse the repository at this point in the history
Added a license file
  • Loading branch information
jeyben committed Apr 28, 2013
1 parent 460041c commit cb48e76
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
4 changes: 2 additions & 2 deletions IOSLinkedInAPI.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = 'IOSLinkedInAPI'
s.version = '0.0.1'
s.version = '0.0.2'
s.license = 'MIT'
s.summary = 'IOS LinkedIn API capable of accessing LinkedIn using oauth2. Using a UIWebView to fetch the authorization code.'
s.homepage = 'https://github.com/jeyben/IOSLinkedInAPI'
s.authors = { 'Jacob von Eyben' => 'jacobvoneyben@gmail.com' }
s.source = { :git => 'https://github.com/jeyben/IOSLinkedInAPI.git', :tag => '0.0.1' }
s.source = { :git => 'https://github.com/jeyben/IOSLinkedInAPI.git', :tag => '0.0.2' }
s.source_files = 'IOSLinkedInAPI'
s.requires_arc = true

Expand Down
2 changes: 1 addition & 1 deletion IOSLinkedInAPI/LIALinkedInAuthorizationViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typedef void(^LIAAuthorizationCodeSuccessCallback)(NSString *code);
typedef void(^LIAAuthorizationCodeCancelCallback)(void);
typedef void(^LIAAuthorizationCodeFailureCallback)(NSError *errorReason);

static NSString *const LINKEDIN_CODE_URL_SUFFIX = @"&state=foobar";
static NSString *const LINKEDIN_CODE_URL_SUFFIX = @"&state=%@";

static NSString *const LINKEDIN_CODE_URL_PREFIX = @"%@/?code=";

Expand Down
2 changes: 1 addition & 1 deletion IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ - (void)viewDidLoad {

self.navigationController.navigationBarHidden = YES;

NSString *linkedIn = [NSString stringWithFormat:@"https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=%@&scope=%@&state=foobar&redirect_uri=%@", self.application.clientId, self.application.grantedAccessString, self.application.redirectURL];
NSString *linkedIn = [NSString stringWithFormat:@"https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=%@&scope=%@&state=%@&redirect_uri=%@", self.application.clientId, self.application.grantedAccessString, self.application.state, self.application.redirectURL];
[self.authenticationWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:linkedIn]]];
}

Expand Down
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2013 Ancientprogramming (http://www.ancientprogramming.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

0 comments on commit cb48e76

Please sign in to comment.