Documentation ¶
Index ¶
- type KeyT
- type MockSigner
- func (m *MockSigner) CleanUp()
- func (m *MockSigner) FetchKeys(ctx context.Context, req *v1alpha1.FetchKeysRequest) (*v1alpha1.FetchKeysResponse, error)
- func (m *MockSigner) GetSupportedKeys() map[string]KeyT
- func (m *MockSigner) Metadata(ctx context.Context, req *v1alpha1.MetadataRequest) (*v1alpha1.MetadataResponse, error)
- func (m *MockSigner) Reset() error
- func (m *MockSigner) SetSupportedKeys(keys map[string]KeyT)
- func (m *MockSigner) Sign(ctx context.Context, req *v1alpha1.SignJWTRequest) (*v1alpha1.SignJWTResponse, error)
- func (m *MockSigner) WaitForSupportedKeysFetch()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSigner ¶
type MockSigner struct { SigningKey *rsa.PrivateKey SigningKeyID string SigningAlg string TokenType string MaxTokenExpirationSeconds int64 FetchError error MetadataError error // contains filtered or unexported fields }
func NewMockSigner ¶
func NewMockSigner(t *testing.T, socketPath string) *MockSigner
NewMockSigner starts and returns a new MockSigner It servers on the provided socket.
func (*MockSigner) CleanUp ¶
func (m *MockSigner) CleanUp()
CleanUp stops gRPC server and the underlying listener.
func (*MockSigner) FetchKeys ¶
func (m *MockSigner) FetchKeys(ctx context.Context, req *v1alpha1.FetchKeysRequest) (*v1alpha1.FetchKeysResponse, error)
func (*MockSigner) GetSupportedKeys ¶
func (m *MockSigner) GetSupportedKeys() map[string]KeyT
func (*MockSigner) Metadata ¶
func (m *MockSigner) Metadata(ctx context.Context, req *v1alpha1.MetadataRequest) (*v1alpha1.MetadataResponse, error)
func (*MockSigner) Reset ¶
func (m *MockSigner) Reset() error
Reset genrate and adds signing/supported keys to MockSigner instance.
func (*MockSigner) SetSupportedKeys ¶
func (m *MockSigner) SetSupportedKeys(keys map[string]KeyT)
func (*MockSigner) Sign ¶
func (m *MockSigner) Sign(ctx context.Context, req *v1alpha1.SignJWTRequest) (*v1alpha1.SignJWTResponse, error)
func (*MockSigner) WaitForSupportedKeysFetch ¶
func (m *MockSigner) WaitForSupportedKeysFetch()
Click to show internal directories.
Click to hide internal directories.