testhelpers

package
v1.9.0-alpha.3.pre.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeIDToken

func DecodeIDToken(t *testing.T, token *oauth2.Token) gjson.Result

func FlexibleServer

func FlexibleServer(t *testing.T, h *http.HandlerFunc) string

func HTTPServerNoExpectedCallHandler

func HTTPServerNoExpectedCallHandler(t *testing.T) http.HandlerFunc

func HTTPServerNotImplementedHandler

func HTTPServerNotImplementedHandler(w http.ResponseWriter, _ *http.Request)

func IntrospectToken

func IntrospectToken(t *testing.T, conf *oauth2.Config, token *oauth2.Token, adminTS *httptest.Server) gjson.Result

func NewCallbackURL

func NewCallbackURL(t *testing.T, prefix string, h http.HandlerFunc) string

func NewEmptyCookieJar

func NewEmptyCookieJar(t *testing.T) *cookiejar.Jar

func NewEmptyJarClient

func NewEmptyJarClient(t *testing.T) *http.Client

func NewIDToken

func NewIDToken(t *testing.T, reg driver.Registry, subject string) string

func NewIDTokenWithClaims

func NewIDTokenWithClaims(t *testing.T, reg driver.Registry, claims djwt.MapClaims) string

func NewIDTokenWithExpiry

func NewIDTokenWithExpiry(t *testing.T, reg driver.Registry, subject string, exp time.Duration) string

func NewLoginConsentUI

func NewLoginConsentUI(t *testing.T, c *config.Provider, login, consent http.HandlerFunc)

func NewOAuth2Server

func NewOAuth2Server(t *testing.T, reg driver.Registry) (publicTS, adminTS *httptest.Server)

func Userinfo

func Userinfo(t *testing.T, token *oauth2.Token, publicTS *httptest.Server) gjson.Result

Types

This section is empty.

Jump to

Keyboard shortcuts

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