INNER CODE UNIT · Go
TestCanonicalJWTAlg
pilinux/gorest · config/config_internal_test.go:117
func TestCanonicalJWTAlg(t *testing.T) {
tests := []struct {
name string
alg string
want string
wantErr bool
}{
// every supported value in the switch is covered
{name: "hs256", alg: "hs256", want: "HS256"},
{name: "hs384", alg: "hs384", want: "HS384"},
{name: "hs512", alg: "hs512", want: "HS512"},
{name: "es256", alg: "es256", want: "ES256"},
{name: "es384", alg: "es384", want: "ES384"},
{name: "es512", alg: "es512", want: "ES512"},
{name: "eddsa", alg: "eddsa", want: "EdDSA"},
{name: "rs256", alg: "rs256", want: "RS256"},
{name: "rs384", alg: "rs384", want: "RS384"},
{name: "rs512", alg: "rs512", want: "RS512"},