validatorMock

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

generated by "charlatan -output=jwt.go JWT". DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeJWT

type FakeJWT struct {
	ClaimsHook    func() jwt.Claims
	ValidateHook  func(interface{}, crypto.SigningMethod, ...*jwt.Validator) error
	SerializeHook func(interface{}) ([]byte, error)

	ClaimsCalls    []*JWTClaimsInvocation
	ValidateCalls  []*JWTValidateInvocation
	SerializeCalls []*JWTSerializeInvocation
}

FakeJWT is a mock implementation of JWT for testing. Use it in your tests as in this example:

package example

func TestWithJWT(t *testing.T) {
	f := &aaa.FakeJWT{
		ClaimsHook: func() (ident1 jwt.Claims) {
			// ensure parameters meet expectations, signal errors using t, etc
			return
		},
	}

	// test code goes here ...

	// assert state of FakeClaims ...
	f.AssertClaimsCalledOnce(t)
}

Create anonymous function implementations for only those interface methods that should be called in the code under test. This will force a panic if any unexpected calls are made to FakeClaims.

func NewFakeJWTDefaultError

func NewFakeJWTDefaultError(t_sym2 JWTTestingT) *FakeJWT

NewFakeJWTDefaultError returns an instance of FakeJWT with all hooks configured to call t.Error

func NewFakeJWTDefaultFatal

func NewFakeJWTDefaultFatal(t_sym1 JWTTestingT) *FakeJWT

NewFakeJWTDefaultFatal returns an instance of FakeJWT with all hooks configured to call t.Fatal

func NewFakeJWTDefaultPanic

func NewFakeJWTDefaultPanic() *FakeJWT

NewFakeJWTDefaultPanic returns an instance of FakeJWT with all hooks configured to panic

func (*FakeJWT) AssertClaimsCalled

func (f *FakeJWT) AssertClaimsCalled(t JWTTestingT)

AssertClaimsCalled calls t.Error if FakeJWT.Claims was not called

func (*FakeJWT) AssertClaimsCalledN

func (f *FakeJWT) AssertClaimsCalledN(t JWTTestingT, n int)

AssertClaimsCalledN calls t.Error if FakeJWT.Claims was called less than n times

func (*FakeJWT) AssertClaimsCalledOnce

func (f *FakeJWT) AssertClaimsCalledOnce(t JWTTestingT)

AssertClaimsCalledOnce calls t.Error if FakeJWT.Claims was not called exactly once

func (*FakeJWT) AssertClaimsNotCalled

func (f *FakeJWT) AssertClaimsNotCalled(t JWTTestingT)

AssertClaimsNotCalled calls t.Error if FakeJWT.Claims was called

func (*FakeJWT) AssertSerializeCalled

func (f *FakeJWT) AssertSerializeCalled(t JWTTestingT)

AssertSerializeCalled calls t.Error if FakeJWT.Serialize was not called

func (*FakeJWT) AssertSerializeCalledN

func (f *FakeJWT) AssertSerializeCalledN(t JWTTestingT, n int)

AssertSerializeCalledN calls t.Error if FakeJWT.Serialize was called less than n times

func (*FakeJWT) AssertSerializeCalledOnce

func (f *FakeJWT) AssertSerializeCalledOnce(t JWTTestingT)

AssertSerializeCalledOnce calls t.Error if FakeJWT.Serialize was not called exactly once

func (*FakeJWT) AssertSerializeCalledOnceWith

func (f_sym19 *FakeJWT) AssertSerializeCalledOnceWith(t JWTTestingT, key interface{})

AssertSerializeCalledOnceWith calls t.Error if FakeJWT.Serialize was not called exactly once with the given values

func (*FakeJWT) AssertSerializeCalledWith

func (f_sym17 *FakeJWT) AssertSerializeCalledWith(t JWTTestingT, key interface{})

AssertSerializeCalledWith calls t.Error if FakeJWT.Serialize was not called with the given values

func (*FakeJWT) AssertSerializeNotCalled

func (f *FakeJWT) AssertSerializeNotCalled(t JWTTestingT)

AssertSerializeNotCalled calls t.Error if FakeJWT.Serialize was called

func (*FakeJWT) AssertValidateCalled

func (f *FakeJWT) AssertValidateCalled(t JWTTestingT)

AssertValidateCalled calls t.Error if FakeJWT.Validate was not called

func (*FakeJWT) AssertValidateCalledN

func (f *FakeJWT) AssertValidateCalledN(t JWTTestingT, n int)

AssertValidateCalledN calls t.Error if FakeJWT.Validate was called less than n times

func (*FakeJWT) AssertValidateCalledOnce

func (f *FakeJWT) AssertValidateCalledOnce(t JWTTestingT)

AssertValidateCalledOnce calls t.Error if FakeJWT.Validate was not called exactly once

func (*FakeJWT) AssertValidateCalledOnceWith

func (f_sym11 *FakeJWT) AssertValidateCalledOnceWith(t JWTTestingT, key interface{}, method crypto.SigningMethod, v ...*jwt.Validator)

AssertValidateCalledOnceWith calls t.Error if FakeJWT.Validate was not called exactly once with the given values

func (*FakeJWT) AssertValidateCalledWith

func (f_sym9 *FakeJWT) AssertValidateCalledWith(t JWTTestingT, key interface{}, method crypto.SigningMethod, v ...*jwt.Validator)

AssertValidateCalledWith calls t.Error if FakeJWT.Validate was not called with the given values

func (*FakeJWT) AssertValidateNotCalled

func (f *FakeJWT) AssertValidateNotCalled(t JWTTestingT)

AssertValidateNotCalled calls t.Error if FakeJWT.Validate was called

func (*FakeJWT) Claims

func (f_sym3 *FakeJWT) Claims() (ident1 jwt.Claims)

func (*FakeJWT) ClaimsCalled

func (f *FakeJWT) ClaimsCalled() bool

ClaimsCalled returns true if FakeJWT.Claims was called

func (*FakeJWT) ClaimsCalledN

func (f *FakeJWT) ClaimsCalledN(n int) bool

ClaimsCalledN returns true if FakeJWT.Claims was called at least n times

func (*FakeJWT) ClaimsCalledOnce

func (f *FakeJWT) ClaimsCalledOnce() bool

ClaimsCalledOnce returns true if FakeJWT.Claims was called exactly once

func (*FakeJWT) ClaimsNotCalled

func (f *FakeJWT) ClaimsNotCalled() bool

ClaimsNotCalled returns true if FakeJWT.Claims was not called

func (*FakeJWT) Reset

func (f *FakeJWT) Reset()

func (*FakeJWT) Serialize

func (f_sym13 *FakeJWT) Serialize(key interface{}) (ident1 []byte, ident2 error)

func (*FakeJWT) SerializeCalled

func (f *FakeJWT) SerializeCalled() bool

SerializeCalled returns true if FakeJWT.Serialize was called

func (*FakeJWT) SerializeCalledN

func (f *FakeJWT) SerializeCalledN(n int) bool

SerializeCalledN returns true if FakeJWT.Serialize was called at least n times

func (*FakeJWT) SerializeCalledOnce

func (f *FakeJWT) SerializeCalledOnce() bool

SerializeCalledOnce returns true if FakeJWT.Serialize was called exactly once

func (*FakeJWT) SerializeCalledOnceWith

func (f_sym18 *FakeJWT) SerializeCalledOnceWith(key interface{}) bool

SerializeCalledOnceWith returns true if FakeJWT.Serialize was called exactly once with the given values

func (*FakeJWT) SerializeCalledWith

func (f_sym16 *FakeJWT) SerializeCalledWith(key interface{}) bool

SerializeCalledWith returns true if FakeJWT.Serialize was called with the given values

func (*FakeJWT) SerializeNotCalled

func (f *FakeJWT) SerializeNotCalled() bool

SerializeNotCalled returns true if FakeJWT.Serialize was not called

func (*FakeJWT) SerializeResultsForCall

func (f_sym20 *FakeJWT) SerializeResultsForCall(key interface{}) (ident1 []byte, ident2 error, found_sym20 bool)

SerializeResultsForCall returns the result values for the first call to FakeJWT.Serialize with the given values

func (*FakeJWT) SetClaimsStub

func (f_sym4 *FakeJWT) SetClaimsStub(ident1 jwt.Claims)

SetClaimsStub configures JWT.Claims to always return the given values

func (*FakeJWT) SetSerializeInvocation

func (f_sym15 *FakeJWT) SetSerializeInvocation(calls_sym15 []*JWTSerializeInvocation, fallback_sym15 func() ([]byte, error))

SetSerializeInvocation configures JWT.Serialize to return the given results when called with the given parameters If no match is found for an invocation the result(s) of the fallback function are returned

func (*FakeJWT) SetSerializeStub

func (f_sym14 *FakeJWT) SetSerializeStub(ident1 []byte, ident2 error)

SetSerializeStub configures JWT.Serialize to always return the given values

func (*FakeJWT) SetValidateInvocation

func (f_sym7 *FakeJWT) SetValidateInvocation(calls_sym7 []*JWTValidateInvocation, fallback_sym7 func() error)

SetValidateInvocation configures JWT.Validate to return the given results when called with the given parameters If no match is found for an invocation the result(s) of the fallback function are returned

func (*FakeJWT) SetValidateStub

func (f_sym6 *FakeJWT) SetValidateStub(ident1 error)

SetValidateStub configures JWT.Validate to always return the given values

func (*FakeJWT) Validate

func (f_sym5 *FakeJWT) Validate(key interface{}, method crypto.SigningMethod, v ...*jwt.Validator) (ident1 error)

func (*FakeJWT) ValidateCalled

func (f *FakeJWT) ValidateCalled() bool

ValidateCalled returns true if FakeJWT.Validate was called

func (*FakeJWT) ValidateCalledN

func (f *FakeJWT) ValidateCalledN(n int) bool

ValidateCalledN returns true if FakeJWT.Validate was called at least n times

func (*FakeJWT) ValidateCalledOnce

func (f *FakeJWT) ValidateCalledOnce() bool

ValidateCalledOnce returns true if FakeJWT.Validate was called exactly once

func (*FakeJWT) ValidateCalledOnceWith

func (f_sym10 *FakeJWT) ValidateCalledOnceWith(key interface{}, method crypto.SigningMethod, v ...*jwt.Validator) bool

ValidateCalledOnceWith returns true if FakeJWT.Validate was called exactly once with the given values

func (*FakeJWT) ValidateCalledWith

func (f_sym8 *FakeJWT) ValidateCalledWith(key interface{}, method crypto.SigningMethod, v ...*jwt.Validator) bool

ValidateCalledWith returns true if FakeJWT.Validate was called with the given values

func (*FakeJWT) ValidateNotCalled

func (f *FakeJWT) ValidateNotCalled() bool

ValidateNotCalled returns true if FakeJWT.Validate was not called

func (*FakeJWT) ValidateResultsForCall

func (f_sym12 *FakeJWT) ValidateResultsForCall(key interface{}, method crypto.SigningMethod, v ...*jwt.Validator) (ident1 error, found_sym12 bool)

ValidateResultsForCall returns the result values for the first call to FakeJWT.Validate with the given values

type FakeValidator

type FakeValidator struct {
	CloseHook                    func() error
	UpdateKeysHook               func() error
	GetRSAPubKeysHook            func() []*rsa.PublicKey
	ValidateApplicationTokenHook func(string, ...string) (bool, error)
	GetAndValidateTokenHook      func(string, ...string) (jwt.JWT, error)
	ValidateUserTokenHook        func(string, ...string) (uint64, uint64, bool, error)
	GetOpenIDConfigHook          func() access.OpenIDConfig

	CloseCalls                    []*ValidatorCloseInvocation
	UpdateKeysCalls               []*ValidatorUpdateKeysInvocation
	GetRSAPubKeysCalls            []*ValidatorGetRSAPubKeysInvocation
	ValidateApplicationTokenCalls []*ValidatorValidateApplicationTokenInvocation
	GetAndValidateTokenCalls      []*ValidatorGetAndValidateTokenInvocation
	ValidateUserTokenCalls        []*ValidatorValidateUserTokenInvocation
	GetOpenIDConfigCalls          []*ValidatorGetOpenIDConfigInvocation
}

FakeValidator is a mock implementation of Validator for testing. Use it in your tests as in this example:

package example

func TestWithValidator(t *testing.T) {
	f := &validatorMock.FakeValidator{
		CloseHook: func() (ident7 error) {
			// ensure parameters meet expections, signal errors using t, etc
			return
		},
	}

	// test code goes here ...

	// assert state of FakeClose ...
	f.AssertCloseCalledOnce(t)
}

Create anonymous function implementations for only those interface methods that should be called in the code under test. This will force a panic if any unexpected calls are made to FakeClose.

func NewFakeValidatorDefaultError

func NewFakeValidatorDefaultError(t_sym2 ValidatorTestingT) *FakeValidator

NewFakeValidatorDefaultError returns an instance of FakeValidator with all hooks configured to call t.Error

func NewFakeValidatorDefaultFatal

func NewFakeValidatorDefaultFatal(t_sym1 ValidatorTestingT) *FakeValidator

NewFakeValidatorDefaultFatal returns an instance of FakeValidator with all hooks configured to call t.Fatal

func NewFakeValidatorDefaultPanic

func NewFakeValidatorDefaultPanic() *FakeValidator

NewFakeValidatorDefaultPanic returns an instance of FakeValidator with all hooks configured to panic

func (*FakeValidator) AssertCloseCalled

func (f *FakeValidator) AssertCloseCalled(t ValidatorTestingT)

AssertCloseCalled calls t.Error if FakeValidator.Close was not called

func (*FakeValidator) AssertCloseCalledN

func (f *FakeValidator) AssertCloseCalledN(t ValidatorTestingT, n int)

AssertCloseCalledN calls t.Error if FakeValidator.Close was called less than n times

func (*FakeValidator) AssertCloseCalledOnce

func (f *FakeValidator) AssertCloseCalledOnce(t ValidatorTestingT)

AssertCloseCalledOnce calls t.Error if FakeValidator.Close was not called exactly once

func (*FakeValidator) AssertCloseNotCalled

func (f *FakeValidator) AssertCloseNotCalled(t ValidatorTestingT)

AssertCloseNotCalled calls t.Error if FakeValidator.Close was called

func (*FakeValidator) AssertGetAndValidateTokenCalled

func (f *FakeValidator) AssertGetAndValidateTokenCalled(t ValidatorTestingT)

AssertGetAndValidateTokenCalled calls t.Error if FakeValidator.GetAndValidateToken was not called

func (*FakeValidator) AssertGetAndValidateTokenCalledN

func (f *FakeValidator) AssertGetAndValidateTokenCalledN(t ValidatorTestingT, n int)

AssertGetAndValidateTokenCalledN calls t.Error if FakeValidator.GetAndValidateToken was called less than n times

func (*FakeValidator) AssertGetAndValidateTokenCalledOnce

func (f *FakeValidator) AssertGetAndValidateTokenCalledOnce(t ValidatorTestingT)

AssertGetAndValidateTokenCalledOnce calls t.Error if FakeValidator.GetAndValidateToken was not called exactly once

func (*FakeValidator) AssertGetAndValidateTokenCalledOnceWith

func (f_sym23 *FakeValidator) AssertGetAndValidateTokenCalledOnceWith(t ValidatorTestingT, accessToken string, requiredScopes ...string)

AssertGetAndValidateTokenCalledOnceWith calls t.Error if FakeValidator.GetAndValidateToken was not called exactly once with the given values

func (*FakeValidator) AssertGetAndValidateTokenCalledWith

func (f_sym21 *FakeValidator) AssertGetAndValidateTokenCalledWith(t ValidatorTestingT, accessToken string, requiredScopes ...string)

AssertGetAndValidateTokenCalledWith calls t.Error if FakeValidator.GetAndValidateToken was not called with the given values

func (*FakeValidator) AssertGetAndValidateTokenNotCalled

func (f *FakeValidator) AssertGetAndValidateTokenNotCalled(t ValidatorTestingT)

AssertGetAndValidateTokenNotCalled calls t.Error if FakeValidator.GetAndValidateToken was called

func (*FakeValidator) AssertGetOpenIDConfigCalled

func (f *FakeValidator) AssertGetOpenIDConfigCalled(t ValidatorTestingT)

AssertGetOpenIDConfigCalled calls t.Error if FakeValidator.GetOpenIDConfig was not called

func (*FakeValidator) AssertGetOpenIDConfigCalledN

func (f *FakeValidator) AssertGetOpenIDConfigCalledN(t ValidatorTestingT, n int)

AssertGetOpenIDConfigCalledN calls t.Error if FakeValidator.GetOpenIDConfig was called less than n times

func (*FakeValidator) AssertGetOpenIDConfigCalledOnce

func (f *FakeValidator) AssertGetOpenIDConfigCalledOnce(t ValidatorTestingT)

AssertGetOpenIDConfigCalledOnce calls t.Error if FakeValidator.GetOpenIDConfig was not called exactly once

func (*FakeValidator) AssertGetOpenIDConfigNotCalled

func (f *FakeValidator) AssertGetOpenIDConfigNotCalled(t ValidatorTestingT)

AssertGetOpenIDConfigNotCalled calls t.Error if FakeValidator.GetOpenIDConfig was called

func (*FakeValidator) AssertGetRSAPubKeysCalled

func (f *FakeValidator) AssertGetRSAPubKeysCalled(t ValidatorTestingT)

AssertGetRSAPubKeysCalled calls t.Error if FakeValidator.GetRSAPubKeys was not called

func (*FakeValidator) AssertGetRSAPubKeysCalledN

func (f *FakeValidator) AssertGetRSAPubKeysCalledN(t ValidatorTestingT, n int)

AssertGetRSAPubKeysCalledN calls t.Error if FakeValidator.GetRSAPubKeys was called less than n times

func (*FakeValidator) AssertGetRSAPubKeysCalledOnce

func (f *FakeValidator) AssertGetRSAPubKeysCalledOnce(t ValidatorTestingT)

AssertGetRSAPubKeysCalledOnce calls t.Error if FakeValidator.GetRSAPubKeys was not called exactly once

func (*FakeValidator) AssertGetRSAPubKeysNotCalled

func (f *FakeValidator) AssertGetRSAPubKeysNotCalled(t ValidatorTestingT)

AssertGetRSAPubKeysNotCalled calls t.Error if FakeValidator.GetRSAPubKeys was called

func (*FakeValidator) AssertUpdateKeysCalled

func (f *FakeValidator) AssertUpdateKeysCalled(t ValidatorTestingT)

AssertUpdateKeysCalled calls t.Error if FakeValidator.UpdateKeys was not called

func (*FakeValidator) AssertUpdateKeysCalledN

func (f *FakeValidator) AssertUpdateKeysCalledN(t ValidatorTestingT, n int)

AssertUpdateKeysCalledN calls t.Error if FakeValidator.UpdateKeys was called less than n times

func (*FakeValidator) AssertUpdateKeysCalledOnce

func (f *FakeValidator) AssertUpdateKeysCalledOnce(t ValidatorTestingT)

AssertUpdateKeysCalledOnce calls t.Error if FakeValidator.UpdateKeys was not called exactly once

func (*FakeValidator) AssertUpdateKeysNotCalled

func (f *FakeValidator) AssertUpdateKeysNotCalled(t ValidatorTestingT)

AssertUpdateKeysNotCalled calls t.Error if FakeValidator.UpdateKeys was called

func (*FakeValidator) AssertValidateApplicationTokenCalled

func (f *FakeValidator) AssertValidateApplicationTokenCalled(t ValidatorTestingT)

AssertValidateApplicationTokenCalled calls t.Error if FakeValidator.ValidateApplicationToken was not called

func (*FakeValidator) AssertValidateApplicationTokenCalledN

func (f *FakeValidator) AssertValidateApplicationTokenCalledN(t ValidatorTestingT, n int)

AssertValidateApplicationTokenCalledN calls t.Error if FakeValidator.ValidateApplicationToken was called less than n times

func (*FakeValidator) AssertValidateApplicationTokenCalledOnce

func (f *FakeValidator) AssertValidateApplicationTokenCalledOnce(t ValidatorTestingT)

AssertValidateApplicationTokenCalledOnce calls t.Error if FakeValidator.ValidateApplicationToken was not called exactly once

func (*FakeValidator) AssertValidateApplicationTokenCalledOnceWith

func (f_sym15 *FakeValidator) AssertValidateApplicationTokenCalledOnceWith(t ValidatorTestingT, accessToken string, requiredScopes ...string)

AssertValidateApplicationTokenCalledOnceWith calls t.Error if FakeValidator.ValidateApplicationToken was not called exactly once with the given values

func (*FakeValidator) AssertValidateApplicationTokenCalledWith

func (f_sym13 *FakeValidator) AssertValidateApplicationTokenCalledWith(t ValidatorTestingT, accessToken string, requiredScopes ...string)

AssertValidateApplicationTokenCalledWith calls t.Error if FakeValidator.ValidateApplicationToken was not called with the given values

func (*FakeValidator) AssertValidateApplicationTokenNotCalled

func (f *FakeValidator) AssertValidateApplicationTokenNotCalled(t ValidatorTestingT)

AssertValidateApplicationTokenNotCalled calls t.Error if FakeValidator.ValidateApplicationToken was called

func (*FakeValidator) AssertValidateUserTokenCalled

func (f *FakeValidator) AssertValidateUserTokenCalled(t ValidatorTestingT)

AssertValidateUserTokenCalled calls t.Error if FakeValidator.ValidateUserToken was not called

func (*FakeValidator) AssertValidateUserTokenCalledN

func (f *FakeValidator) AssertValidateUserTokenCalledN(t ValidatorTestingT, n int)

AssertValidateUserTokenCalledN calls t.Error if FakeValidator.ValidateUserToken was called less than n times

func (*FakeValidator) AssertValidateUserTokenCalledOnce

func (f *FakeValidator) AssertValidateUserTokenCalledOnce(t ValidatorTestingT)

AssertValidateUserTokenCalledOnce calls t.Error if FakeValidator.ValidateUserToken was not called exactly once

func (*FakeValidator) AssertValidateUserTokenCalledOnceWith

func (f_sym31 *FakeValidator) AssertValidateUserTokenCalledOnceWith(t ValidatorTestingT, accessToken string, requiredScopes ...string)

AssertValidateUserTokenCalledOnceWith calls t.Error if FakeValidator.ValidateUserToken was not called exactly once with the given values

func (*FakeValidator) AssertValidateUserTokenCalledWith

func (f_sym29 *FakeValidator) AssertValidateUserTokenCalledWith(t ValidatorTestingT, accessToken string, requiredScopes ...string)

AssertValidateUserTokenCalledWith calls t.Error if FakeValidator.ValidateUserToken was not called with the given values

func (*FakeValidator) AssertValidateUserTokenNotCalled

func (f *FakeValidator) AssertValidateUserTokenNotCalled(t ValidatorTestingT)

AssertValidateUserTokenNotCalled calls t.Error if FakeValidator.ValidateUserToken was called

func (*FakeValidator) Close

func (f_sym3 *FakeValidator) Close() (ident7 error)

func (*FakeValidator) CloseCalled

func (f *FakeValidator) CloseCalled() bool

CloseCalled returns true if FakeValidator.Close was called

func (*FakeValidator) CloseCalledN

func (f *FakeValidator) CloseCalledN(n int) bool

CloseCalledN returns true if FakeValidator.Close was called at least n times

func (*FakeValidator) CloseCalledOnce

func (f *FakeValidator) CloseCalledOnce() bool

CloseCalledOnce returns true if FakeValidator.Close was called exactly once

func (*FakeValidator) CloseNotCalled

func (f *FakeValidator) CloseNotCalled() bool

CloseNotCalled returns true if FakeValidator.Close was not called

func (*FakeValidator) GetAndValidateToken

func (f_sym17 *FakeValidator) GetAndValidateToken(accessToken string, requiredScopes ...string) (ident1 jwt.JWT, ident2 error)

func (*FakeValidator) GetAndValidateTokenCalled

func (f *FakeValidator) GetAndValidateTokenCalled() bool

GetAndValidateTokenCalled returns true if FakeValidator.GetAndValidateToken was called

func (*FakeValidator) GetAndValidateTokenCalledN

func (f *FakeValidator) GetAndValidateTokenCalledN(n int) bool

GetAndValidateTokenCalledN returns true if FakeValidator.GetAndValidateToken was called at least n times

func (*FakeValidator) GetAndValidateTokenCalledOnce

func (f *FakeValidator) GetAndValidateTokenCalledOnce() bool

GetAndValidateTokenCalledOnce returns true if FakeValidator.GetAndValidateToken was called exactly once

func (*FakeValidator) GetAndValidateTokenCalledOnceWith

func (f_sym22 *FakeValidator) GetAndValidateTokenCalledOnceWith(accessToken string, requiredScopes ...string) bool

GetAndValidateTokenCalledOnceWith returns true if FakeValidator.GetAndValidateToken was called exactly once with the given values

func (*FakeValidator) GetAndValidateTokenCalledWith

func (f_sym20 *FakeValidator) GetAndValidateTokenCalledWith(accessToken string, requiredScopes ...string) bool

GetAndValidateTokenCalledWith returns true if FakeValidator.GetAndValidateToken was called with the given values

func (*FakeValidator) GetAndValidateTokenNotCalled

func (f *FakeValidator) GetAndValidateTokenNotCalled() bool

GetAndValidateTokenNotCalled returns true if FakeValidator.GetAndValidateToken was not called

func (*FakeValidator) GetAndValidateTokenResultsForCall

func (f_sym24 *FakeValidator) GetAndValidateTokenResultsForCall(accessToken string, requiredScopes ...string) (ident1 jwt.JWT, ident2 error, found_sym24 bool)

GetAndValidateTokenResultsForCall returns the result values for the first call to FakeValidator.GetAndValidateToken with the given values

func (*FakeValidator) GetOpenIDConfig

func (f_sym33 *FakeValidator) GetOpenIDConfig() (ident1 access.OpenIDConfig)

func (*FakeValidator) GetOpenIDConfigCalled

func (f *FakeValidator) GetOpenIDConfigCalled() bool

GetOpenIDConfigCalled returns true if FakeValidator.GetOpenIDConfig was called

func (*FakeValidator) GetOpenIDConfigCalledN

func (f *FakeValidator) GetOpenIDConfigCalledN(n int) bool

GetOpenIDConfigCalledN returns true if FakeValidator.GetOpenIDConfig was called at least n times

func (*FakeValidator) GetOpenIDConfigCalledOnce

func (f *FakeValidator) GetOpenIDConfigCalledOnce() bool

GetOpenIDConfigCalledOnce returns true if FakeValidator.GetOpenIDConfig was called exactly once

func (*FakeValidator) GetOpenIDConfigNotCalled

func (f *FakeValidator) GetOpenIDConfigNotCalled() bool

GetOpenIDConfigNotCalled returns true if FakeValidator.GetOpenIDConfig was not called

func (*FakeValidator) GetRSAPubKeys

func (f_sym7 *FakeValidator) GetRSAPubKeys() (ident1 []*rsa.PublicKey)

func (*FakeValidator) GetRSAPubKeysCalled

func (f *FakeValidator) GetRSAPubKeysCalled() bool

GetRSAPubKeysCalled returns true if FakeValidator.GetRSAPubKeys was called

func (*FakeValidator) GetRSAPubKeysCalledN

func (f *FakeValidator) GetRSAPubKeysCalledN(n int) bool

GetRSAPubKeysCalledN returns true if FakeValidator.GetRSAPubKeys was called at least n times

func (*FakeValidator) GetRSAPubKeysCalledOnce

func (f *FakeValidator) GetRSAPubKeysCalledOnce() bool

GetRSAPubKeysCalledOnce returns true if FakeValidator.GetRSAPubKeys was called exactly once

func (*FakeValidator) GetRSAPubKeysNotCalled

func (f *FakeValidator) GetRSAPubKeysNotCalled() bool

GetRSAPubKeysNotCalled returns true if FakeValidator.GetRSAPubKeys was not called

func (*FakeValidator) Reset

func (f *FakeValidator) Reset()

func (*FakeValidator) SetCloseStub

func (f_sym4 *FakeValidator) SetCloseStub(ident7 error)

SetCloseStub configures Validator.Close to always return the given values

func (*FakeValidator) SetGetAndValidateTokenInvocation

func (f_sym19 *FakeValidator) SetGetAndValidateTokenInvocation(calls_sym19 []*ValidatorGetAndValidateTokenInvocation, fallback_sym19 func() (jwt.JWT, error))

SetGetAndValidateTokenInvocation configures Validator.GetAndValidateToken to return the given results when called with the given parameters If no match is found for an invocation the result(s) of the fallback function are returned

func (*FakeValidator) SetGetAndValidateTokenStub

func (f_sym18 *FakeValidator) SetGetAndValidateTokenStub(ident1 jwt.JWT, ident2 error)

SetGetAndValidateTokenStub configures Validator.GetAndValidateToken to always return the given values

func (*FakeValidator) SetGetOpenIDConfigStub

func (f_sym34 *FakeValidator) SetGetOpenIDConfigStub(ident1 access.OpenIDConfig)

SetGetOpenIDConfigStub configures Validator.GetOpenIDConfig to always return the given values

func (*FakeValidator) SetGetRSAPubKeysStub

func (f_sym8 *FakeValidator) SetGetRSAPubKeysStub(ident1 []*rsa.PublicKey)

SetGetRSAPubKeysStub configures Validator.GetRSAPubKeys to always return the given values

func (*FakeValidator) SetUpdateKeysStub

func (f_sym6 *FakeValidator) SetUpdateKeysStub(ident1 error)

SetUpdateKeysStub configures Validator.UpdateKeys to always return the given values

func (*FakeValidator) SetValidateApplicationTokenInvocation

func (f_sym11 *FakeValidator) SetValidateApplicationTokenInvocation(calls_sym11 []*ValidatorValidateApplicationTokenInvocation, fallback_sym11 func() (bool, error))

SetValidateApplicationTokenInvocation configures Validator.ValidateApplicationToken to return the given results when called with the given parameters If no match is found for an invocation the result(s) of the fallback function are returned

func (*FakeValidator) SetValidateApplicationTokenStub

func (f_sym10 *FakeValidator) SetValidateApplicationTokenStub(ident1 bool, ident2 error)

SetValidateApplicationTokenStub configures Validator.ValidateApplicationToken to always return the given values

func (*FakeValidator) SetValidateUserTokenInvocation

func (f_sym27 *FakeValidator) SetValidateUserTokenInvocation(calls_sym27 []*ValidatorValidateUserTokenInvocation, fallback_sym27 func() (uint64, uint64, bool, error))

SetValidateUserTokenInvocation configures Validator.ValidateUserToken to return the given results when called with the given parameters If no match is found for an invocation the result(s) of the fallback function are returned

func (*FakeValidator) SetValidateUserTokenStub

func (f_sym26 *FakeValidator) SetValidateUserTokenStub(ident1 uint64, ident2 uint64, ident3 bool, ident4 error)

SetValidateUserTokenStub configures Validator.ValidateUserToken to always return the given values

func (*FakeValidator) UpdateKeys

func (f_sym5 *FakeValidator) UpdateKeys() (ident1 error)

func (*FakeValidator) UpdateKeysCalled

func (f *FakeValidator) UpdateKeysCalled() bool

UpdateKeysCalled returns true if FakeValidator.UpdateKeys was called

func (*FakeValidator) UpdateKeysCalledN

func (f *FakeValidator) UpdateKeysCalledN(n int) bool

UpdateKeysCalledN returns true if FakeValidator.UpdateKeys was called at least n times

func (*FakeValidator) UpdateKeysCalledOnce

func (f *FakeValidator) UpdateKeysCalledOnce() bool

UpdateKeysCalledOnce returns true if FakeValidator.UpdateKeys was called exactly once

func (*FakeValidator) UpdateKeysNotCalled

func (f *FakeValidator) UpdateKeysNotCalled() bool

UpdateKeysNotCalled returns true if FakeValidator.UpdateKeys was not called

func (*FakeValidator) ValidateApplicationToken

func (f_sym9 *FakeValidator) ValidateApplicationToken(accessToken string, requiredScopes ...string) (ident1 bool, ident2 error)

func (*FakeValidator) ValidateApplicationTokenCalled

func (f *FakeValidator) ValidateApplicationTokenCalled() bool

ValidateApplicationTokenCalled returns true if FakeValidator.ValidateApplicationToken was called

func (*FakeValidator) ValidateApplicationTokenCalledN

func (f *FakeValidator) ValidateApplicationTokenCalledN(n int) bool

ValidateApplicationTokenCalledN returns true if FakeValidator.ValidateApplicationToken was called at least n times

func (*FakeValidator) ValidateApplicationTokenCalledOnce

func (f *FakeValidator) ValidateApplicationTokenCalledOnce() bool

ValidateApplicationTokenCalledOnce returns true if FakeValidator.ValidateApplicationToken was called exactly once

func (*FakeValidator) ValidateApplicationTokenCalledOnceWith

func (f_sym14 *FakeValidator) ValidateApplicationTokenCalledOnceWith(accessToken string, requiredScopes ...string) bool

ValidateApplicationTokenCalledOnceWith returns true if FakeValidator.ValidateApplicationToken was called exactly once with the given values

func (*FakeValidator) ValidateApplicationTokenCalledWith

func (f_sym12 *FakeValidator) ValidateApplicationTokenCalledWith(accessToken string, requiredScopes ...string) bool

ValidateApplicationTokenCalledWith returns true if FakeValidator.ValidateApplicationToken was called with the given values

func (*FakeValidator) ValidateApplicationTokenNotCalled

func (f *FakeValidator) ValidateApplicationTokenNotCalled() bool

ValidateApplicationTokenNotCalled returns true if FakeValidator.ValidateApplicationToken was not called

func (*FakeValidator) ValidateApplicationTokenResultsForCall

func (f_sym16 *FakeValidator) ValidateApplicationTokenResultsForCall(accessToken string, requiredScopes ...string) (ident1 bool, ident2 error, found_sym16 bool)

ValidateApplicationTokenResultsForCall returns the result values for the first call to FakeValidator.ValidateApplicationToken with the given values

func (*FakeValidator) ValidateUserToken

func (f_sym25 *FakeValidator) ValidateUserToken(accessToken string, requiredScopes ...string) (ident1 uint64, ident2 uint64, ident3 bool, ident4 error)

func (*FakeValidator) ValidateUserTokenCalled

func (f *FakeValidator) ValidateUserTokenCalled() bool

ValidateUserTokenCalled returns true if FakeValidator.ValidateUserToken was called

func (*FakeValidator) ValidateUserTokenCalledN

func (f *FakeValidator) ValidateUserTokenCalledN(n int) bool

ValidateUserTokenCalledN returns true if FakeValidator.ValidateUserToken was called at least n times

func (*FakeValidator) ValidateUserTokenCalledOnce

func (f *FakeValidator) ValidateUserTokenCalledOnce() bool

ValidateUserTokenCalledOnce returns true if FakeValidator.ValidateUserToken was called exactly once

func (*FakeValidator) ValidateUserTokenCalledOnceWith

func (f_sym30 *FakeValidator) ValidateUserTokenCalledOnceWith(accessToken string, requiredScopes ...string) bool

ValidateUserTokenCalledOnceWith returns true if FakeValidator.ValidateUserToken was called exactly once with the given values

func (*FakeValidator) ValidateUserTokenCalledWith

func (f_sym28 *FakeValidator) ValidateUserTokenCalledWith(accessToken string, requiredScopes ...string) bool

ValidateUserTokenCalledWith returns true if FakeValidator.ValidateUserToken was called with the given values

func (*FakeValidator) ValidateUserTokenNotCalled

func (f *FakeValidator) ValidateUserTokenNotCalled() bool

ValidateUserTokenNotCalled returns true if FakeValidator.ValidateUserToken was not called

func (*FakeValidator) ValidateUserTokenResultsForCall

func (f_sym32 *FakeValidator) ValidateUserTokenResultsForCall(accessToken string, requiredScopes ...string) (ident1 uint64, ident2 uint64, ident3 bool, ident4 error, found_sym32 bool)

ValidateUserTokenResultsForCall returns the result values for the first call to FakeValidator.ValidateUserToken with the given values

type JWTClaimsInvocation

type JWTClaimsInvocation struct {
	Results struct {
		Ident1 jwt.Claims
	}
}

JWTClaimsInvocation represents a single call of FakeJWT.Claims

type JWTSerializeInvocation

type JWTSerializeInvocation struct {
	Parameters struct {
		Key interface{}
	}
	Results struct {
		Ident1 []byte
		Ident2 error
	}
}

JWTSerializeInvocation represents a single call of FakeJWT.Serialize

func NewJWTSerializeInvocation

func NewJWTSerializeInvocation(key interface{}, ident1 []byte, ident2 error) *JWTSerializeInvocation

NewJWTSerializeInvocation creates a new instance of JWTSerializeInvocation

type JWTTestingT

type JWTTestingT interface {
	Error(...interface{})
	Errorf(string, ...interface{})
	Fatal(...interface{})
	Helper()
}

JWTTestingT represents the methods of "testing".T used by charlatan Fakes. It avoids importing the testing package.

type JWTValidateInvocation

type JWTValidateInvocation struct {
	Parameters struct {
		Key    interface{}
		Method crypto.SigningMethod
		V      []*jwt.Validator
	}
	Results struct {
		Ident1 error
	}
}

JWTValidateInvocation represents a single call of FakeJWT.Validate

func NewJWTValidateInvocation

func NewJWTValidateInvocation(key interface{}, method crypto.SigningMethod, v []*jwt.Validator, ident1 error) *JWTValidateInvocation

NewJWTValidateInvocation creates a new instance of JWTValidateInvocation

type ValidatorCloseInvocation

type ValidatorCloseInvocation struct {
	Results struct {
		Ident7 error
	}
}

ValidatorCloseInvocation represents a single call of FakeValidator.Close

type ValidatorGetAndValidateTokenInvocation

type ValidatorGetAndValidateTokenInvocation struct {
	Parameters struct {
		AccessToken    string
		RequiredScopes []string
	}
	Results struct {
		Ident1 jwt.JWT
		Ident2 error
	}
}

ValidatorGetAndValidateTokenInvocation represents a single call of FakeValidator.GetAndValidateToken

func NewValidatorGetAndValidateTokenInvocation

func NewValidatorGetAndValidateTokenInvocation(accessToken string, requiredScopes []string, ident1 jwt.JWT, ident2 error) *ValidatorGetAndValidateTokenInvocation

NewValidatorGetAndValidateTokenInvocation creates a new instance of ValidatorGetAndValidateTokenInvocation

type ValidatorGetOpenIDConfigInvocation

type ValidatorGetOpenIDConfigInvocation struct {
	Results struct {
		Ident1 access.OpenIDConfig
	}
}

ValidatorGetOpenIDConfigInvocation represents a single call of FakeValidator.GetOpenIDConfig

type ValidatorGetRSAPubKeysInvocation

type ValidatorGetRSAPubKeysInvocation struct {
	Results struct {
		Ident1 []*rsa.PublicKey
	}
}

ValidatorGetRSAPubKeysInvocation represents a single call of FakeValidator.GetRSAPubKeys

type ValidatorTestingT

type ValidatorTestingT interface {
	Error(...interface{})
	Errorf(string, ...interface{})
	Fatal(...interface{})
	Helper()
}

ValidatorTestingT represents the methods of "testing".T used by charlatan Fakes. It avoids importing the testing package.

type ValidatorUpdateKeysInvocation

type ValidatorUpdateKeysInvocation struct {
	Results struct {
		Ident1 error
	}
}

ValidatorUpdateKeysInvocation represents a single call of FakeValidator.UpdateKeys

type ValidatorValidateApplicationTokenInvocation

type ValidatorValidateApplicationTokenInvocation struct {
	Parameters struct {
		AccessToken    string
		RequiredScopes []string
	}
	Results struct {
		Ident1 bool
		Ident2 error
	}
}

ValidatorValidateApplicationTokenInvocation represents a single call of FakeValidator.ValidateApplicationToken

func NewValidatorValidateApplicationTokenInvocation

func NewValidatorValidateApplicationTokenInvocation(accessToken string, requiredScopes []string, ident1 bool, ident2 error) *ValidatorValidateApplicationTokenInvocation

NewValidatorValidateApplicationTokenInvocation creates a new instance of ValidatorValidateApplicationTokenInvocation

type ValidatorValidateUserTokenInvocation

type ValidatorValidateUserTokenInvocation struct {
	Parameters struct {
		AccessToken    string
		RequiredScopes []string
	}
	Results struct {
		Ident1 uint64
		Ident2 uint64
		Ident3 bool
		Ident4 error
	}
}

ValidatorValidateUserTokenInvocation represents a single call of FakeValidator.ValidateUserToken

func NewValidatorValidateUserTokenInvocation

func NewValidatorValidateUserTokenInvocation(accessToken string, requiredScopes []string, ident1 uint64, ident2 uint64, ident3 bool, ident4 error) *ValidatorValidateUserTokenInvocation

NewValidatorValidateUserTokenInvocation creates a new instance of ValidatorValidateUserTokenInvocation

Jump to

Keyboard shortcuts

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