test

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientTest = "test"
	// Client with short auth code and access token expiration
	ClientTestShortExpiration = "testShortExpiration"
	// Client will return error when the same auth code or refresh token
	// is used repeatedly within a minute of the first use
	ClientTestRestrictedAuth = "testRestrictedAuth"
	// Client with expired access token
	ClientTestExpired = "testExpired"
	// Client for C2C testing
	ClientTestC2C = "testC2C"
	// Client with configured required params used to verify the authorization and token request query params
	ClientTestRequiredParams = "requiredParams"
	// Secret for client with configured required params
	ClientTestRequiredParamsSecret = "requiredParamsSecret"
	// Valid refresh token if refresh token restriction policy not configured
	ValidRefreshToken = "refresh-token"
)

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(t *testing.T, authServerHost, clientID string) string

func GetAuthorizationCode

func GetAuthorizationCode(t *testing.T, authServerHost, clientID, deviceID, scopes string) string

func GetDefaultAccessToken

func GetDefaultAccessToken(t *testing.T) string

func GetDefaultDeviceAuthorizationCode

func GetDefaultDeviceAuthorizationCode(t *testing.T, deviceID string) string

func HTTPDo

func HTTPDo(t *testing.T, req *http.Request, followRedirect bool) *http.Response

func MakeConfig

func MakeConfig(t *testing.T) service.Config

func New

func New(t *testing.T, cfg service.Config) func()

func NewRequest

func NewRequest(method, host, url string, body io.Reader) *requestBuilder

func SetUp

func SetUp(t *testing.T) (TearDown func())

Types

This section is empty.

Jump to

Keyboard shortcuts

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