Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Update README.md #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ An implementation of [JSON Web Tokens](http://self-issued.info/docs/draft-ietf-o
Jwt-scala has been published for scala 2.11/2.10 and sbt 0.13.6

Add the dependency to your build.sbt
```
```scala
libraryDependencies += "io.really" %% "jwt-scala" % "1.2.2"
```

### Usage

#### Encode
```
```scala
import io.really.jwt._
import play.api.libs.json.Json

Expand All @@ -25,7 +25,7 @@ val jwt = JWT.encode("secret-key", payload)
```
By default Encode will use `HS256` Algorithm but you can pass optional Algorithm

```
```scala
val jwt = JWT.encode("secret-key", payload, Some(Algorithm.HS256))
```
***Supported algorithm are :***
Expand All @@ -35,7 +35,7 @@ val jwt = JWT.encode("secret-key", payload, Some(Algorithm.HS256))

#### Decode

```
```scala
val payload = Json.obj("name" -> "Ahmed", "email" -> "[email protected]")
val jwt = JWT.encode("secret", payload)

Expand Down