mock

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectDecoder

func ExpectDecoder(a op.Authorizer)

func ExpectEncoder

func ExpectEncoder(a op.Authorizer)

func ExpectInvalidClientID

func ExpectInvalidClientID(s op.Storage)

func ExpectSigner

func ExpectSigner(a op.Authorizer, t *testing.T)

func ExpectSigningKey

func ExpectSigningKey(s op.Storage)

func ExpectSigningKeyError

func ExpectSigningKeyError(s op.Storage)

func ExpectSigningKeyInvalid

func ExpectSigningKeyInvalid(s op.Storage)

func ExpectStorage

func ExpectStorage(a op.Authorizer, t *testing.T)

func ExpectValidClientID

func ExpectValidClientID(s op.Storage)

func NewAuthorizer

func NewAuthorizer(t *testing.T) op.Authorizer

func NewAuthorizerExpectValid

func NewAuthorizerExpectValid(t *testing.T, wantErr bool) op.Authorizer

func NewClient

func NewClient(t *testing.T) op.Client

func NewClientExpectAny

func NewClientExpectAny(t *testing.T, appType op.ApplicationType) op.Client

func NewMockStorageAny

func NewMockStorageAny(t *testing.T) op.Storage

func NewMockStorageExpectInvalidClientID

func NewMockStorageExpectInvalidClientID(t *testing.T) op.Storage

func NewMockStorageExpectValidClientID

func NewMockStorageExpectValidClientID(t *testing.T) op.Storage

func NewMockStorageSigningKey

func NewMockStorageSigningKey(t *testing.T) op.Storage

func NewMockStorageSigningKeyError

func NewMockStorageSigningKeyError(t *testing.T) op.Storage

func NewMockStorageSigningKeyInvalid

func NewMockStorageSigningKeyInvalid(t *testing.T) op.Storage

func NewStorage

func NewStorage(t *testing.T) op.Storage

Types

type ConfClient

type ConfClient struct {
	// contains filtered or unexported fields
}

func (*ConfClient) AccessTokenLifetime

func (c *ConfClient) AccessTokenLifetime() time.Duration

func (*ConfClient) AccessTokenType

func (c *ConfClient) AccessTokenType() op.AccessTokenType

func (*ConfClient) ApplicationType

func (c *ConfClient) ApplicationType() op.ApplicationType

func (*ConfClient) GetAuthMethod

func (c *ConfClient) GetAuthMethod() op.AuthMethod

func (*ConfClient) GetID

func (c *ConfClient) GetID() string

func (*ConfClient) IDTokenLifetime

func (c *ConfClient) IDTokenLifetime() time.Duration

func (*ConfClient) LoginURL

func (c *ConfClient) LoginURL(id string) string

func (*ConfClient) RedirectURIs

func (c *ConfClient) RedirectURIs() []string

type MockAuthorizer

type MockAuthorizer struct {
	// contains filtered or unexported fields
}

MockAuthorizer is a mock of Authorizer interface

func NewMockAuthorizer

func NewMockAuthorizer(ctrl *gomock.Controller) *MockAuthorizer

NewMockAuthorizer creates a new mock instance

func (*MockAuthorizer) Crypto

func (m *MockAuthorizer) Crypto() op.Crypto

Crypto mocks base method

func (*MockAuthorizer) Decoder

func (m *MockAuthorizer) Decoder() *schema.Decoder

Decoder mocks base method

func (*MockAuthorizer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockAuthorizer) Encoder

func (m *MockAuthorizer) Encoder() *schema.Encoder

Encoder mocks base method

func (*MockAuthorizer) Issuer

func (m *MockAuthorizer) Issuer() string

Issuer mocks base method

func (*MockAuthorizer) Signer

func (m *MockAuthorizer) Signer() op.Signer

Signer mocks base method

func (*MockAuthorizer) Storage

func (m *MockAuthorizer) Storage() op.Storage

Storage mocks base method

type MockAuthorizerMockRecorder

type MockAuthorizerMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthorizerMockRecorder is the mock recorder for MockAuthorizer

func (*MockAuthorizerMockRecorder) Crypto

func (mr *MockAuthorizerMockRecorder) Crypto() *gomock.Call

Crypto indicates an expected call of Crypto

func (*MockAuthorizerMockRecorder) Decoder

func (mr *MockAuthorizerMockRecorder) Decoder() *gomock.Call

Decoder indicates an expected call of Decoder

func (*MockAuthorizerMockRecorder) Encoder

func (mr *MockAuthorizerMockRecorder) Encoder() *gomock.Call

Encoder indicates an expected call of Encoder

func (*MockAuthorizerMockRecorder) Issuer

func (mr *MockAuthorizerMockRecorder) Issuer() *gomock.Call

Issuer indicates an expected call of Issuer

func (*MockAuthorizerMockRecorder) Signer

func (mr *MockAuthorizerMockRecorder) Signer() *gomock.Call

Signer indicates an expected call of Signer

func (*MockAuthorizerMockRecorder) Storage

func (mr *MockAuthorizerMockRecorder) Storage() *gomock.Call

Storage indicates an expected call of Storage

type MockClient

type MockClient struct {
	// contains filtered or unexported fields
}

MockClient is a mock of Client interface

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance

func (*MockClient) AccessTokenLifetime

func (m *MockClient) AccessTokenLifetime() time.Duration

AccessTokenLifetime mocks base method

func (*MockClient) AccessTokenType

func (m *MockClient) AccessTokenType() op.AccessTokenType

AccessTokenType mocks base method

func (*MockClient) ApplicationType

func (m *MockClient) ApplicationType() op.ApplicationType

ApplicationType mocks base method

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockClient) GetAuthMethod

func (m *MockClient) GetAuthMethod() op.AuthMethod

GetAuthMethod mocks base method

func (*MockClient) GetID

func (m *MockClient) GetID() string

GetID mocks base method

func (*MockClient) IDTokenLifetime

func (m *MockClient) IDTokenLifetime() time.Duration

IDTokenLifetime mocks base method

func (*MockClient) LoginURL

func (m *MockClient) LoginURL(arg0 string) string

LoginURL mocks base method

func (*MockClient) RedirectURIs

func (m *MockClient) RedirectURIs() []string

RedirectURIs mocks base method

type MockClientMockRecorder

type MockClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockClientMockRecorder is the mock recorder for MockClient

func (*MockClientMockRecorder) AccessTokenLifetime

func (mr *MockClientMockRecorder) AccessTokenLifetime() *gomock.Call

AccessTokenLifetime indicates an expected call of AccessTokenLifetime

func (*MockClientMockRecorder) AccessTokenType

func (mr *MockClientMockRecorder) AccessTokenType() *gomock.Call

AccessTokenType indicates an expected call of AccessTokenType

func (*MockClientMockRecorder) ApplicationType

func (mr *MockClientMockRecorder) ApplicationType() *gomock.Call

ApplicationType indicates an expected call of ApplicationType

func (*MockClientMockRecorder) GetAuthMethod

func (mr *MockClientMockRecorder) GetAuthMethod() *gomock.Call

GetAuthMethod indicates an expected call of GetAuthMethod

func (*MockClientMockRecorder) GetID

func (mr *MockClientMockRecorder) GetID() *gomock.Call

GetID indicates an expected call of GetID

func (*MockClientMockRecorder) IDTokenLifetime

func (mr *MockClientMockRecorder) IDTokenLifetime() *gomock.Call

IDTokenLifetime indicates an expected call of IDTokenLifetime

func (*MockClientMockRecorder) LoginURL

func (mr *MockClientMockRecorder) LoginURL(arg0 interface{}) *gomock.Call

LoginURL indicates an expected call of LoginURL

func (*MockClientMockRecorder) RedirectURIs

func (mr *MockClientMockRecorder) RedirectURIs() *gomock.Call

RedirectURIs indicates an expected call of RedirectURIs

type MockConfiguration

type MockConfiguration struct {
	// contains filtered or unexported fields
}

MockConfiguration is a mock of Configuration interface

func NewMockConfiguration

func NewMockConfiguration(ctrl *gomock.Controller) *MockConfiguration

NewMockConfiguration creates a new mock instance

func (*MockConfiguration) AuthMethodPostSupported

func (m *MockConfiguration) AuthMethodPostSupported() bool

AuthMethodPostSupported mocks base method

func (*MockConfiguration) AuthorizationEndpoint

func (m *MockConfiguration) AuthorizationEndpoint() op.Endpoint

AuthorizationEndpoint mocks base method

func (*MockConfiguration) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockConfiguration) Issuer

func (m *MockConfiguration) Issuer() string

Issuer mocks base method

func (*MockConfiguration) KeysEndpoint

func (m *MockConfiguration) KeysEndpoint() op.Endpoint

KeysEndpoint mocks base method

func (*MockConfiguration) Port

func (m *MockConfiguration) Port() string

Port mocks base method

func (*MockConfiguration) TokenEndpoint

func (m *MockConfiguration) TokenEndpoint() op.Endpoint

TokenEndpoint mocks base method

func (*MockConfiguration) UserinfoEndpoint

func (m *MockConfiguration) UserinfoEndpoint() op.Endpoint

UserinfoEndpoint mocks base method

type MockConfigurationMockRecorder

type MockConfigurationMockRecorder struct {
	// contains filtered or unexported fields
}

MockConfigurationMockRecorder is the mock recorder for MockConfiguration

func (*MockConfigurationMockRecorder) AuthMethodPostSupported

func (mr *MockConfigurationMockRecorder) AuthMethodPostSupported() *gomock.Call

AuthMethodPostSupported indicates an expected call of AuthMethodPostSupported

func (*MockConfigurationMockRecorder) AuthorizationEndpoint

func (mr *MockConfigurationMockRecorder) AuthorizationEndpoint() *gomock.Call

AuthorizationEndpoint indicates an expected call of AuthorizationEndpoint

func (*MockConfigurationMockRecorder) Issuer

Issuer indicates an expected call of Issuer

func (*MockConfigurationMockRecorder) KeysEndpoint

func (mr *MockConfigurationMockRecorder) KeysEndpoint() *gomock.Call

KeysEndpoint indicates an expected call of KeysEndpoint

func (*MockConfigurationMockRecorder) Port

Port indicates an expected call of Port

func (*MockConfigurationMockRecorder) TokenEndpoint

func (mr *MockConfigurationMockRecorder) TokenEndpoint() *gomock.Call

TokenEndpoint indicates an expected call of TokenEndpoint

func (*MockConfigurationMockRecorder) UserinfoEndpoint

func (mr *MockConfigurationMockRecorder) UserinfoEndpoint() *gomock.Call

UserinfoEndpoint indicates an expected call of UserinfoEndpoint

type MockSigner

type MockSigner struct {
	// contains filtered or unexported fields
}

MockSigner is a mock of Signer interface

func NewMockSigner

func NewMockSigner(ctrl *gomock.Controller) *MockSigner

NewMockSigner creates a new mock instance

func (*MockSigner) EXPECT

func (m *MockSigner) EXPECT() *MockSignerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockSigner) Health added in v0.2.1

func (m *MockSigner) Health(arg0 context.Context) error

Health mocks base method

func (*MockSigner) SignAccessToken

func (m *MockSigner) SignAccessToken(arg0 *oidc.AccessTokenClaims) (string, error)

SignAccessToken mocks base method

func (*MockSigner) SignIDToken

func (m *MockSigner) SignIDToken(arg0 *oidc.IDTokenClaims) (string, error)

SignIDToken mocks base method

func (*MockSigner) SignatureAlgorithm

func (m *MockSigner) SignatureAlgorithm() go_jose_v2.SignatureAlgorithm

SignatureAlgorithm mocks base method

type MockSignerMockRecorder

type MockSignerMockRecorder struct {
	// contains filtered or unexported fields
}

MockSignerMockRecorder is the mock recorder for MockSigner

func (*MockSignerMockRecorder) Health added in v0.2.1

func (mr *MockSignerMockRecorder) Health(arg0 interface{}) *gomock.Call

Health indicates an expected call of Health

func (*MockSignerMockRecorder) SignAccessToken

func (mr *MockSignerMockRecorder) SignAccessToken(arg0 interface{}) *gomock.Call

SignAccessToken indicates an expected call of SignAccessToken

func (*MockSignerMockRecorder) SignIDToken

func (mr *MockSignerMockRecorder) SignIDToken(arg0 interface{}) *gomock.Call

SignIDToken indicates an expected call of SignIDToken

func (*MockSignerMockRecorder) SignatureAlgorithm

func (mr *MockSignerMockRecorder) SignatureAlgorithm() *gomock.Call

SignatureAlgorithm indicates an expected call of SignatureAlgorithm

type MockStorage

type MockStorage struct {
	// contains filtered or unexported fields
}

MockStorage is a mock of Storage interface

func NewMockStorage

func NewMockStorage(ctrl *gomock.Controller) *MockStorage

NewMockStorage creates a new mock instance

func (*MockStorage) AuthRequestByID

func (m *MockStorage) AuthRequestByID(arg0 context.Context, arg1 string) (op.AuthRequest, error)

AuthRequestByID mocks base method

func (*MockStorage) AuthorizeClientIDSecret

func (m *MockStorage) AuthorizeClientIDSecret(arg0 context.Context, arg1, arg2 string) error

AuthorizeClientIDSecret mocks base method

func (*MockStorage) CreateAuthRequest

func (m *MockStorage) CreateAuthRequest(arg0 context.Context, arg1 *oidc.AuthRequest) (op.AuthRequest, error)

CreateAuthRequest mocks base method

func (*MockStorage) DeleteAuthRequest

func (m *MockStorage) DeleteAuthRequest(arg0 context.Context, arg1 string) error

DeleteAuthRequest mocks base method

func (*MockStorage) EXPECT

func (m *MockStorage) EXPECT() *MockStorageMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockStorage) GetClientByClientID

func (m *MockStorage) GetClientByClientID(arg0 context.Context, arg1 string) (op.Client, error)

GetClientByClientID mocks base method

func (*MockStorage) GetKeySet

func (m *MockStorage) GetKeySet(arg0 context.Context) (*go_jose_v2.JSONWebKeySet, error)

GetKeySet mocks base method

func (*MockStorage) GetSigningKey

func (m *MockStorage) GetSigningKey(arg0 context.Context, arg1 chan<- go_jose_v2.SigningKey, arg2 chan<- error, arg3 <-chan time.Time)

GetSigningKey mocks base method

func (*MockStorage) GetUserinfoFromScopes

func (m *MockStorage) GetUserinfoFromScopes(arg0 context.Context, arg1 []string) (*oidc.Userinfo, error)

GetUserinfoFromScopes mocks base method

func (*MockStorage) Health added in v0.2.1

func (m *MockStorage) Health(arg0 context.Context) error

Health mocks base method

func (*MockStorage) SaveNewKeyPair added in v0.2.1

func (m *MockStorage) SaveNewKeyPair(arg0 context.Context) error

SaveNewKeyPair mocks base method

type MockStorageMockRecorder

type MockStorageMockRecorder struct {
	// contains filtered or unexported fields
}

MockStorageMockRecorder is the mock recorder for MockStorage

func (*MockStorageMockRecorder) AuthRequestByID

func (mr *MockStorageMockRecorder) AuthRequestByID(arg0, arg1 interface{}) *gomock.Call

AuthRequestByID indicates an expected call of AuthRequestByID

func (*MockStorageMockRecorder) AuthorizeClientIDSecret

func (mr *MockStorageMockRecorder) AuthorizeClientIDSecret(arg0, arg1, arg2 interface{}) *gomock.Call

AuthorizeClientIDSecret indicates an expected call of AuthorizeClientIDSecret

func (*MockStorageMockRecorder) CreateAuthRequest

func (mr *MockStorageMockRecorder) CreateAuthRequest(arg0, arg1 interface{}) *gomock.Call

CreateAuthRequest indicates an expected call of CreateAuthRequest

func (*MockStorageMockRecorder) DeleteAuthRequest

func (mr *MockStorageMockRecorder) DeleteAuthRequest(arg0, arg1 interface{}) *gomock.Call

DeleteAuthRequest indicates an expected call of DeleteAuthRequest

func (*MockStorageMockRecorder) GetClientByClientID

func (mr *MockStorageMockRecorder) GetClientByClientID(arg0, arg1 interface{}) *gomock.Call

GetClientByClientID indicates an expected call of GetClientByClientID

func (*MockStorageMockRecorder) GetKeySet

func (mr *MockStorageMockRecorder) GetKeySet(arg0 interface{}) *gomock.Call

GetKeySet indicates an expected call of GetKeySet

func (*MockStorageMockRecorder) GetSigningKey

func (mr *MockStorageMockRecorder) GetSigningKey(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

GetSigningKey indicates an expected call of GetSigningKey

func (*MockStorageMockRecorder) GetUserinfoFromScopes

func (mr *MockStorageMockRecorder) GetUserinfoFromScopes(arg0, arg1 interface{}) *gomock.Call

GetUserinfoFromScopes indicates an expected call of GetUserinfoFromScopes

func (*MockStorageMockRecorder) Health added in v0.2.1

func (mr *MockStorageMockRecorder) Health(arg0 interface{}) *gomock.Call

Health indicates an expected call of Health

func (*MockStorageMockRecorder) SaveNewKeyPair added in v0.2.1

func (mr *MockStorageMockRecorder) SaveNewKeyPair(arg0 interface{}) *gomock.Call

SaveNewKeyPair indicates an expected call of SaveNewKeyPair

type Sig

type Sig struct{}

func (*Sig) Health added in v0.2.1

func (s *Sig) Health(ctx context.Context) error

func (*Sig) SignAccessToken

func (s *Sig) SignAccessToken(*oidc.AccessTokenClaims) (string, error)

func (*Sig) SignIDToken

func (s *Sig) SignIDToken(*oidc.IDTokenClaims) (string, error)

func (*Sig) SignatureAlgorithm

func (s *Sig) SignatureAlgorithm() jose.SignatureAlgorithm

Jump to

Keyboard shortcuts

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