Skip to content

Instantly share code, notes, and snippets.

@Premal-Khetani
Created March 24, 2016 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Premal-Khetani/738b57cb82ce7ea6facc to your computer and use it in GitHub Desktop.
Save Premal-Khetani/738b57cb82ce7ea6facc to your computer and use it in GitHub Desktop.
NSDictionary *jsonDataTobeEncode = @{@"sub":@"123456",@"name":@"Premal",@"admin": @true};
NSString *jwtTokenValue = [JWTBuilder encodePayload:jsonDataTobeEncode].secret(@"SecretKey").algorithm([JWTAlgorithmFactory algorithmByName:@"HS256"]).encode;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment