test

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManagerTests

func ManagerTests(deps Deps, m consent.Manager, clientManager client.Manager, fositeManager x.FositeStorer, network string, parallel bool) func(t *testing.T)

func MockAuthRequest

func MockAuthRequest(key string, authAt bool, network string) (c *flow.LoginRequest, h *flow.HandledLoginRequest, f *flow.Flow)

func MockConsentRequest

func MockConsentRequest(key string, remember bool, rememberFor int, hasError bool, skip bool, authAt bool, loginChallengeBase string, network string) (c *flow.OAuth2ConsentRequest, h *flow.AcceptOAuth2ConsentRequest, f *flow.Flow)

func MockLogoutRequest

func MockLogoutRequest(key string, withClient bool, network string) (c *flow.LogoutRequest)

func SaneMockAuthRequest

func SaneMockAuthRequest(t *testing.T, m consent.Manager, ls *flow.LoginSession, cl *client.Client) (c *flow.LoginRequest)

SaneMockAuthRequest does the same thing as MockAuthRequest but uses less insanity and implicit dependencies.

func SaneMockConsentRequest

func SaneMockConsentRequest(t *testing.T, m consent.Manager, f *flow.Flow, skip bool) (c *flow.OAuth2ConsentRequest)

SaneMockConsentRequest does the same thing as MockConsentRequest but uses less insanity and implicit dependencies.

func SaneMockHandleConsentRequest

func SaneMockHandleConsentRequest(t *testing.T, m consent.Manager, f *flow.Flow, c *flow.OAuth2ConsentRequest, authAt time.Time, rememberFor int, remember bool, hasError bool) *flow.AcceptOAuth2ConsentRequest

func TestHelperNID

func TestHelperNID(r interface {
	client.ManagerProvider
	FlowCipher() *aead.XChaCha20Poly1305
}, t1ValidNID consent.Manager, t2InvalidNID consent.Manager) func(t *testing.T)

Types

type Deps

type Deps interface {
	FlowCipher() *aead.XChaCha20Poly1305
	contextx.Provider
}

Jump to

Keyboard shortcuts

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