Documentation ¶
Overview ¶
Package testing provides internal testing utilities.
Index ¶
- type GRPCServerTokenCreatorMock
- type GRPCServerTokenIntrospectorMock
- func (m *GRPCServerTokenIntrospectorMock) IntrospectToken(ctx context.Context, req *pb.IntrospectTokenRequest) (*pb.IntrospectTokenResponse, error)
- func (m *GRPCServerTokenIntrospectorMock) ResetCallsInfo()
- func (m *GRPCServerTokenIntrospectorMock) SetAccessTokenForIntrospection(accessToken string)
- func (m *GRPCServerTokenIntrospectorMock) SetResultForToken(token string, result *pb.IntrospectTokenResponse)
- func (m *GRPCServerTokenIntrospectorMock) SetScopeForJWTID(jwtID string, scope []*pb.AccessTokenScope)
- type HTTPServerTokenIntrospectorMock
- func (m *HTTPServerTokenIntrospectorMock) IntrospectToken(r *http.Request, token string) (idptoken.IntrospectionResult, error)
- func (m *HTTPServerTokenIntrospectorMock) ResetCallsInfo()
- func (m *HTTPServerTokenIntrospectorMock) SetAccessTokenForIntrospection(accessToken string)
- func (m *HTTPServerTokenIntrospectorMock) SetResultForToken(token string, result idptoken.IntrospectionResult)
- func (m *HTTPServerTokenIntrospectorMock) SetScopeForJWTID(jwtID string, scope []jwt.AccessPolicy)
- type JWTParser
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 (m *GRPCServerTokenCreatorMock) CreateToken( ctx context.Context, req *pb.CreateTokenRequest, ) (*pb.CreateTokenResponse, error)
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 (m *GRPCServerTokenIntrospectorMock) IntrospectToken( ctx context.Context, req *pb.IntrospectTokenRequest, ) (*pb.IntrospectTokenResponse, error)
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 (m *HTTPServerTokenIntrospectorMock) IntrospectToken( r *http.Request, token string, ) (idptoken.IntrospectionResult, error)
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)
Click to show internal directories.
Click to hide internal directories.