Latest 0.2.3
Homepage https://github.com/gabrielrinaldi/GROAuth2SessionManager
License MIT
Platforms ios 6.0, osx 10.9, requires ARC
Dependencies AFNetworking
Authors ,

GROAuth2SessionManager is an extension for AFNetworking that greatly simplifies the process of authenticating against an OAuth 2 provider. It is based in the AFOAuth2Client, but with some changes to support AFNetworking 2.

Example Usage

NSURL *url = [NSURL URLWithString:@"http://example.com/"];
GROAuth2SessionManager *sessionManager = [GROAuth2SessionManager managerWithBaseURL:url clientID:kClientID secret:kClientSecret];

[sessionManager authenticateUsingOAuthWithPath:@"/oauth/token"
                                   username:@"username"
                                   password:@"password"
                                      scope:@"email"
                                    success:^(AFOAuthCredential *credential) {
                                        NSLog(@"I have a token! %@", credential.accessToken);
                                        [AFOAuthCredential storeCredential:credential withIdentifier:sessionManager.serviceProviderIdentifier];
                                    }
                                    failure:^(NSError *error) {
                                        NSLog(@"Error: %@", error);
                                    }];

Documentation

Documentation for all releases of GROAuth2SessionManager, including the latest, are available on CocoaDocs.

Contact

Gabriel Rinaldi

Mattt Thompson

License

GROAuth2SessionManager is available under the MIT license. See the LICENSE file for more info.

Bitdeli Badge

Latest podspec

{
    "name": "GROAuth2SessionManager",
    "version": "0.2.3",
    "license": "MIT",
    "summary": "AFNetworking Extension for OAuth 2 Authentication.",
    "homepage": "https://github.com/gabrielrinaldi/GROAuth2SessionManager",
    "authors": {
        "Gabriel Rinaldi": "[email protected]",
        "Mattt Thompson": "[email protected]"
    },
    "source": {
        "git": "https://github.com/gabrielrinaldi/GROAuth2SessionManager.git",
        "tag": "0.2.3"
    },
    "source_files": "GROAuth2SessionManager",
    "requires_arc": true,
    "platforms": {
        "ios": "6.0",
        "osx": "10.9"
    },
    "dependencies": {
        "AFNetworking": [
            "~> 2.4.1"
        ]
    },
    "ios": {
        "frameworks": "Security"
    },
    "prefix_header_contents": "#ifdef __OBJC__n  #import n  #if __IPHONE_OS_VERSION_MIN_REQUIREDn    #import n    #import n  #elsen    #import n    #import n  #endifn#endif /* __OBJC__*/n"
}

Pin It on Pinterest

Share This