Documentation
¶
Overview ¶
Package cfaccesstest makes Cloudflare Access tokens for tests: an RSA signing key set, its JWKS document and signed JWTs.
Index ¶
- type Keys
- func (ks *Keys) JWKS() []byte
- func (ks *Keys) Rotate(t testing.TB, kid string)
- func (ks *Keys) Server(t testing.TB) string
- func (ks *Keys) Sign(t testing.TB, kid string, claims any) string
- func (ks *Keys) SignWithStranger(t testing.TB, kid string, claims any) string
- func (ks *Keys) Unsigned(t testing.TB, kid string, claims any) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
Keys is a set of signing keys by key ID.
func (*Keys) JWKS ¶
JWKS is the key set as https://TEAM/cdn-cgi/access/certs serves it.
func (*Keys) Server ¶
Server serves the key set at /cdn-cgi/access/certs; it returns the URL of that document.
func (*Keys) Sign ¶
Sign makes a token signed by the key kid; a kid not in the set is signed by the first key but names kid.
func (*Keys) SignWithStranger ¶
SignWithStranger makes a token that names kid but is signed by a key outside the set.