testing

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package testing provides internal testing utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCServerTokenIntrospectorMock

type GRPCServerTokenIntrospectorMock struct {
	JWTParser JWTParser

	Called                bool
	LastAuthorizationMeta string
	LastRequest           *pb.IntrospectTokenRequest
	// contains filtered or unexported fields
}

func NewGRPCServerTokenIntrospectorMock

func NewGRPCServerTokenIntrospectorMock() *GRPCServerTokenIntrospectorMock

func (*GRPCServerTokenIntrospectorMock) IntrospectToken

func (*GRPCServerTokenIntrospectorMock) ResetCallsInfo

func (m *GRPCServerTokenIntrospectorMock) ResetCallsInfo()

func (*GRPCServerTokenIntrospectorMock) SetResultForToken

func (m *GRPCServerTokenIntrospectorMock) SetResultForToken(token string, result *pb.IntrospectTokenResponse)

func (*GRPCServerTokenIntrospectorMock) SetScopeForJWTID

func (m *GRPCServerTokenIntrospectorMock) SetScopeForJWTID(jwtID string, scope []*pb.AccessTokenScope)

type HTTPServerTokenIntrospectorMock

type HTTPServerTokenIntrospectorMock struct {
	JWTParser JWTParser

	Called                  bool
	LastAuthorizationHeader string
	LastIntrospectedToken   string
	LastFormValues          url.Values
	// contains filtered or unexported fields
}

func NewHTTPServerTokenIntrospectorMock

func NewHTTPServerTokenIntrospectorMock() *HTTPServerTokenIntrospectorMock

func (*HTTPServerTokenIntrospectorMock) IntrospectToken

func (*HTTPServerTokenIntrospectorMock) ResetCallsInfo

func (m *HTTPServerTokenIntrospectorMock) ResetCallsInfo()

func (*HTTPServerTokenIntrospectorMock) SetResultForToken

func (m *HTTPServerTokenIntrospectorMock) SetResultForToken(token string, result idptoken.IntrospectionResult)

func (*HTTPServerTokenIntrospectorMock) SetScopeForJWTID

func (m *HTTPServerTokenIntrospectorMock) SetScopeForJWTID(jwtID string, scope []jwt.AccessPolicy)

type JWTParser

type JWTParser interface {
	Parse(ctx context.Context, token string) (*jwt.Claims, error)
}

Jump to

Keyboard shortcuts

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