Skip to content

Commit

Permalink
Format and align README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aria3ppp committed Apr 17, 2023
1 parent 69df9b3 commit 582e7f8
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# jwtauth
`jwtauth` handle multiple keys for jwt token signing and verification.

[![Tests](https://github.com/aria3ppp/jwtauth/actions/workflows/tests.yml/badge.svg)](https://github.com/aria3ppp/jwtauth/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/aria3ppp/jwtauth/badge.svg?branch=master)](https://coveralls.io/github/aria3ppp/jwtauth?branch=master)

Expand Down Expand Up @@ -38,21 +39,21 @@ auth := jwtauth.New[CustomClaims](
jwt.SigningMethodES,
),
jwtauth.NewECDSAKey(
"kid#2",
ecdsaPrivateKey,
jwt.SigningMethodES256,
),
"kid#2",
ecdsaPrivateKey,
jwt.SigningMethodES256,
),
// keys marked as deprecated
jwtauth.NewHMACKey(
"kid#3",
[]byte("another_secret"),
jwt.SigningMethodHS256,
).Deprecated(),
jwtauth.NewRSAKey(
"kid#4",
rsaPrivateKey,
jwt.SigningMethodRS256,
).Deprecated(),
jwtauth.NewHMACKey(
"kid#3",
[]byte("another_secret"),
jwt.SigningMethodHS256,
).Deprecated(),
jwtauth.NewRSAKey(
"kid#4",
rsaPrivateKey,
jwt.SigningMethodRS256,
).Deprecated(),
)

// Generate token
Expand Down

0 comments on commit 582e7f8

Please sign in to comment.