Skip to content

Commit

Permalink
Merge branch 'master' of github.com:stannie/swift-jwt
Browse files Browse the repository at this point in the history
  • Loading branch information
stannie committed Apr 10, 2015
2 parents 3438feb + e54ea6e commit 5caecd0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@ Swift Framework for JWT (JSON Web Token)

Created for Authentiq ID

## Examples

```Swift
import JWT

let jwt_str = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InBob25lIiwicGhvbmVfbnVtYmVyIjoiKzE2NTAyODU1NjAwIiwidHlwZSI6ImxhbmRsaW5lIiwiYXVkIjoiaHR0cHM6Ly9hdXRoZW50aXEuY29tIn0.CAqNpbmOA9lz9aq7Sp1NqqbdLJARmFKY3L7CKcgXLNU"

var jwt = JWT(algorithms: ["none","HS256"])
var j = jwt.loads(jwt_str, key: "secret")
let new_jwt_str = jwt.dumps("xxx")!
```

0 comments on commit 5caecd0

Please sign in to comment.