snaptest

package module
v0.0.0-...-8b8a4b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const KID = "iavFkL-RHipSr2PLhZ_u8gDDBBWc__e-0bVCPPkc0Tw"

KID is the kid used by JWTGen

View Source
const PEM = `` /* 1678-byte string literal not displayed */

PEM is the certificate used for testing with a jwt

Variables

This section is empty.

Functions

func Fatal

func Fatal(err error)

Fatal fails the test if err is present

func JWTGen

func JWTGen(userID int64, roles []string) string

JWTGen generates a jwt token that can be used for testing

func MockJwks

func MockJwks(url string)

MockJwks adds mocks for the jwks servers

func URLTest

func URLTest(req *http.Request, jwtToken string, t *testing.T) (int, []byte, http.Header)

URLTest wraps making an http request to local test server

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL