HawkClient 1.4.0

HawkClient 1.4.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.



  • By
  • ricardosousa1989

HawkClient iOS

This project is an implementation of Hawk client for iOS. For more information visit hueniverse/hawk.
This client don't use the port number when generates the MAC because some hosts services use load balancing.
It is also available in this project, the function for creating a nonce and the function for get the timestamp in seconds from UTC.

Installation

From Cocoapods.

Usage

With this client is possible to make a request with and without payload validation.
Example without payload validation:


NSString *header = [HawkClient generateAuthorizationHeader:url method:method timestamp:timestamp nonce:nonce credentials:credentials ext:ext payload:ext payloadValidation:NO];

Example with payload validation:

 
NSString *header = [HawkClient generateAuthorizationHeader:url method:method timestamp:timestamp nonce:nonce credentials:credentials ext:ext payload:payload payloadValidation:YES];
  

See unit tests project if you still in doubt.

Dependencies