From aab672fb2c702ec22a997ec7ce11e03bab3d0fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gerdau?= Date: Wed, 14 Oct 2020 18:40:02 +0200 Subject: [PATCH] docs: clarify supported go versions --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c15c440..3630623 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ go get github.com/kernle32dll/jwtcache-go Detailed documentation can be found on [GoDoc](https://godoc.org/github.com/kernle32dll/jwtcache-go). -### Usage +## Usage First, you have to instantiate a `jwt.Cache`. This is done via `jwt.NewCache` (which takes option style parameters). @@ -47,7 +47,7 @@ token, err := jwt.EnsureToken(context.Background()) **Implementation detail**: The validity check is done via the `exp` claim of the JWT. If it is not set, the token is never cached. However, the token is still passed trough (and a warning is logged). -### Further usage +## Further usage In addition to the `jwt.Cache`, this lib has an additional trick up its sleeve in the form of `jwt.CacheMap`. @@ -68,4 +68,8 @@ tenantCache.EnsureToken(context.Background(), "d1851563-c529-42d9-994b-6b996ec4b The use-case `jwt.CacheMap` was implemented for was multi-tenant applications, which need to independently cache JWTs per tenant (a good cache key might be the UUID of a tenant, for example). -**Implementation detail**: The underlying map is concurrency-safe, and lazily initialized. \ No newline at end of file +**Implementation detail**: The underlying map is concurrency-safe, and lazily initialized. + +## Compatibility + +jwt-cache-go is automatically tested against Go 1.13.X, 1.14.X and 1.15.X. \ No newline at end of file