From ed2297e2ad534b90ad9faeee79978f48cc6b1381 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 28 Feb 2019 20:47:08 -0700 Subject: [PATCH] add more docs --- keyfetch/fetch.go | 8 ++++++++ keyserve/keyserve.go | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/keyfetch/fetch.go b/keyfetch/fetch.go index a01a613..f2e5202 100644 --- a/keyfetch/fetch.go +++ b/keyfetch/fetch.go @@ -1,3 +1,11 @@ +// Package keyfetch retrieve and cache PublicKeys +// from OIDC (https://example.com/.well-known/openid-configuration) +// and Auth0 (https://example.com/.well-known/jwks.json) +// JWKs URLs and expires them when `exp` is reached +// (or a default expiry if the key does not provide one). +// It uses the keypairs package to Unmarshal the JWKs into their +// native types (with a very thin shim to provide the type safety +// that Go's crypto.PublicKey and crypto.PrivateKey interfaces lack). package keyfetch import ( diff --git a/keyserve/keyserve.go b/keyserve/keyserve.go index e22a11e..25290b3 100644 --- a/keyserve/keyserve.go +++ b/keyserve/keyserve.go @@ -1,3 +1,7 @@ +// Package keyserve provides middleware to serve Public Keys +// via OIDC-style (https://example.com/.well-known/openid-configuration) +// and Auth0-style (https://example.com/.well-known/jwks.json) +// URLs. It uses the keypairs package to encode to JWK format. package keyserve import (