Latest 2.4
Homepage https://github.com/google/macops-MOLAuthenticatingURLSession
License Apache 2.0
Platforms osx 10.9
Dependencies MOLCertificate
Frameworks Security
Authors

A wrapper around NSURLSession providing validation of server certificates
and easy-to-use client certificate authentication.

Requires ARC. Tested on OS X 10.11+.

Usage


#import <MOLAuthenticatingURLSession/MOLAuthenticatingURLSession.h>

- (void)postToServer {
  MOLAuthenticatingURLSession *authURLSession = [[MOLAuthenticatingURLSession alloc] init];
  authURLSession.userAgent = @"MyUserAgent";
  authURLSession.refusesRedirects = YES;
  authURLSession.serverHostname = @"my-hostname.com";
  NSURLSession *session = authURLSession.session;
  // You can use the NSURLSession as you would normally..
}

If you’d like to print status/error information:

  authURLSession.loggingBlock = ^(NSString *line) {
    NSLog(@"%@", line);
  };

Installation

Install using CocoaPods.

pod 'MOLAuthenticatingURLSession'

You can also import the project manually but this isn’t tested.

Documentation

Reference documentation is at CocoaDocs.org:

http://cocoadocs.org/docsets/MOLAuthenticatingURLSession

Contributing

Patches to this library are very much welcome.
Please see the CONTRIBUTING file.

Latest podspec

{
    "name": "MOLAuthenticatingURLSession",
    "version": "2.4",
    "platforms": {
        "osx": "10.9"
    },
    "license": {
        "type": "Apache 2.0",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/google/macops-MOLAuthenticatingURLSession",
    "authors": {
        "Google Macops": "[email protected]"
    },
    "summary": "An NSURLSession wrapper that handles certificate validation nicely",
    "source": {
        "git": "https://github.com/google/macops-MOLAuthenticatingURLSession.git",
        "tag": "v2.4"
    },
    "source_files": "Source/MOLAuthenticatingURLSession/*.{h,m}",
    "frameworks": "Security",
    "dependencies": {
        "MOLCertificate": [
            "~> 1.8"
        ]
    }
}

Pin It on Pinterest

Share This