Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignWithParams ¶
SignWithParams returns a signature with giving params and metadata.
Types ¶
type ConsumerSignFilter ¶
type ConsumerSignFilter struct{}
ConsumerSignFilter signs the request on consumer side
func (*ConsumerSignFilter) Invoke ¶
func (csf *ConsumerSignFilter) Invoke(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result
Invoke retrieves the configured Authenticator to add signature to invocation
func (*ConsumerSignFilter) OnResponse ¶
func (csf *ConsumerSignFilter) OnResponse(ctx context.Context, result protocol.Result, invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result
OnResponse dummy process, returns the result directly
type DefaultAccesskeyStorage ¶
type DefaultAccesskeyStorage struct{}
DefaultAccesskeyStorage is the default implementation of AccesskeyStorage
func (*DefaultAccesskeyStorage) GetAccessKeyPair ¶
func (storage *DefaultAccesskeyStorage) GetAccessKeyPair(invocation protocol.Invocation, url *common.URL) *filter.AccessKeyPair
GetAccessKeyPair retrieves AccessKeyPair from url by the key "accessKeyId" and "secretAccessKey"
type DefaultAuthenticator ¶
type DefaultAuthenticator struct{}
DefaultAuthenticator is the default implementation of Authenticator
func (*DefaultAuthenticator) Authenticate ¶
func (authenticator *DefaultAuthenticator) Authenticate(invocation protocol.Invocation, url *common.URL) error
Authenticate verifies whether the signature sent by the requester is correct
func (*DefaultAuthenticator) Sign ¶
func (authenticator *DefaultAuthenticator) Sign(invocation protocol.Invocation, url *common.URL) error
Sign adds the signature to the invocation
type ProviderAuthFilter ¶
type ProviderAuthFilter struct{}
ProviderAuthFilter verifies the correctness of the signature on provider side
func (*ProviderAuthFilter) Invoke ¶
func (paf *ProviderAuthFilter) Invoke(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result
Invoke retrieves the configured Authenticator to verify the signature in an invocation
func (*ProviderAuthFilter) OnResponse ¶
func (paf *ProviderAuthFilter) OnResponse(ctx context.Context, result protocol.Result, invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result
OnResponse dummy process, returns the result directly