Skip to content

Commit

Permalink
Update README.md (#163)
Browse files Browse the repository at this point in the history
Fixed invalid example for creating token with the 'fluent builder API'
  • Loading branch information
Zexuz authored and abatishchev committed Mar 28, 2018
1 parent 6674041 commit 1997339
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ Console.WriteLine(token);
## Or using the fluent builder API

```csharp
var token = new JwtBuilder().
   .WithAlgorithm(new HMACSHA256Algorithm())
   .WithSecret(secret)
.AddClaim(ClaimName.ExpirationTime, DateTime.UtcNow.AddHours(1))
.Build();
var token = new JwtBuilder()
.WithAlgorithm(new HMACSHA256Algorithm())
.WithSecret(secret)
.AddClaim("exp", DateTimeOffset.UtcNow.AddHours(1).ToUnixTimeSeconds())
.AddClaim("calim2", "claim2-value)
.Build();

Console.WriteLine(token);
```
Expand Down

0 comments on commit 1997339

Please sign in to comment.