JSON web tokens are a common way to pass data safely through the web, and here’s an open source library from Auth0 submitted by Martin Gontovnikas for decoding JWTs.
The library provides methods for easily extracting JSON data and expiry dates from the web tokens, and also provides convenience methods for checking whether the web token is expired.
This example from the readme shows how to decode a web token in Swift:
var error:NSError?
let payload = A0JWTDecoder.payloadOfJWT(jwt, error: &error)
println("JWT payload is :")
You can find JWTDecode.iOS on Github here.
A nice easy way to decode JSON Web TOkens.
- Easy App Store Promo Code Distribution Tool With Tracking
- Free Tool That Automatically Converts JSON Models To Objective-C Objects And Core Data Models
- A Set Of iOS Object And Collection Categories For Easy Importing And Creation Of JSON Data
- Open Source Objective-C Library For Easily Validating JSON Data
- Tutorial: How To Use The JSONModel Library For Easily Handling JSON Data
Original article: Open Source iOS Library For Easily Decoding JSON Web Tokens (JWTs)
©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.




