credtest

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package credtest contains test helpers for testing endpoints client credentials requirement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathClientCreds

func PathClientCreds(t *testing.T, r *mux.Router, domainURL string, f func(*http.Request) error) map[string]Requirement

PathClientCreds returns all client credentials in router.

func RequestWithClientCreds

func RequestWithClientCreds(t *testing.T, domainURL, path, clientID, clientSecret string) *http.Request

RequestWithClientCreds builds request to test client credentials.

Types

type Requirement

type Requirement struct {
	ClientID     bool
	ClientSecret bool
}

Requirement is the client credentials requirement.

Jump to

Keyboard shortcuts

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