testing

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 12 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 GRPCServerTokenCreatorMock added in v0.5.0

type GRPCServerTokenCreatorMock struct {
	Called      bool
	LastRequest *pb.CreateTokenRequest
	// contains filtered or unexported fields
}

func NewGRPCServerTokenCreatorMock added in v0.5.0

func NewGRPCServerTokenCreatorMock() *GRPCServerTokenCreatorMock

func (*GRPCServerTokenCreatorMock) CreateToken added in v0.5.0

func (*GRPCServerTokenCreatorMock) ResetCallsInfo added in v0.5.0

func (m *GRPCServerTokenCreatorMock) ResetCallsInfo()

func (*GRPCServerTokenCreatorMock) SetResultForToken added in v0.5.0

func (m *GRPCServerTokenCreatorMock) SetResultForToken(token string, result *pb.CreateTokenResponse)

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) SetAccessTokenForIntrospection added in v0.5.0

func (m *GRPCServerTokenIntrospectorMock) SetAccessTokenForIntrospection(accessToken string)

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) SetAccessTokenForIntrospection added in v0.5.0

func (m *HTTPServerTokenIntrospectorMock) SetAccessTokenForIntrospection(accessToken string)

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