~bigbes/core-go

86e1e934bfe34735a11e441fabeab6051cf8461e — Drew DeVault 5 years ago 6c80f87
webhooks: panic on nested webhook auth case

This is not strictly speaking necessary since we have a panic which
immediately follows the switch, but it is cleaner.
1 files changed, 2 insertions(+), 0 deletions(-)

M webhooks/config.go
M webhooks/config.go => webhooks/config.go +2 -0
@@ 41,6 41,8 @@ func NewAuthConfig(ctx context.Context) (AuthConfig, error) {
	case auth.AUTH_INTERNAL:
		// TODO: Should this work?
		panic("Internal webtoken auth is not supported")
	case auth.AUTH_WEBHOOK:
		panic("Recursive webhook auth is not supported")
	}
	panic("Unreachable")
}