Latest 1.0.0
Homepage https://github.com/siuying/IGSignature
License MIT
Platforms ios 5.0, requires ARC
Dependencies IGDigest
Authors

Objective-C client of signature gem. Sign API call with shared secret and timestamp using SHA256 HMAC.

Examples

token   = [[IGSignatureToken alloc] initWithKey:@"key" secret:@"secret"];
request = [[IGSignatureRequest alloc] initWithMethod:@"POST"
                                                path:@"/some/path"
                                               query:@{@"query": @"params", @"go": @"here"}];
[request sign:token];

NSMutableDictionary* queryParams = [NSMutableDictionary dictionaryWithDictionary:[request auth]];
[queryParams addEntriesFromDictionary:[request query]];

queryParams looks like:

{
  @"query": @"params",
  @"go": @"here",
  @"auth_version": @"1.0",
  @"auth_key": @"key",
  @"auth_timestamp": 1234,
  @"auth_signature": @"3b237953a5ba6619875cbb2a2d43e8da9ef5824e8a2c689f6284ac85bc1ea0db"
}

Copyright

Copyright (c) 2013 Francis Chong. This software is licensed under the MIT License. See LICENSE for details.

Latest podspec

{
    "name": "IGSignature",
    "version": "1.0.0",
    "summary": "Objective-C client of signature gem. Sign API call with shared secret and timestamp using SHA256 HMAC.",
    "homepage": "https://github.com/siuying/IGSignature",
    "authors": {
        "Francis Chong": "[email protected]"
    },
    "license": "MIT",
    "source": {
        "git": "https://github.com/siuying/IGSignature.git",
        "tag": "1.0.0"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "5.0"
    },
    "source_files": "IGSignature/Signature/*.{m,h}",
    "dependencies": {
        "IGDigest": [
            "~> 1.1.0"
        ]
    }
}

Pin It on Pinterest

Share This