Documentation ¶
Index ¶
- Constants
- type AuthSignature
- func (a *AuthSignature) Config() interface{}
- func (a *AuthSignature) ErrorDescriptions() map[string]string
- func (a *AuthSignature) ErrorProtocolCodes() map[string]int
- func (a *AuthSignature) Handle(ctx auth.AuthContext) (bool, error)
- func (a *AuthSignature) Init(cfg config.Config, log logger.Logger, vld validator.Validator, ...) error
- func (a *AuthSignature) SetAuthManager(manager auth.AuthManager)
- type AuthSignatureConfig
Constants ¶
View Source
const SignatureParameter = "signature"
View Source
const SignatureProtocol = "signature"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthSignature ¶
type AuthSignature struct { auth.AuthHandlerBase AuthSignatureConfig // contains filtered or unexported fields }
func New ¶
func New(manager signature.SignatureManager) *AuthSignature
func (*AuthSignature) Config ¶
func (a *AuthSignature) Config() interface{}
func (*AuthSignature) ErrorDescriptions ¶
func (a *AuthSignature) ErrorDescriptions() map[string]string
func (*AuthSignature) ErrorProtocolCodes ¶
func (a *AuthSignature) ErrorProtocolCodes() map[string]int
func (*AuthSignature) Handle ¶
func (a *AuthSignature) Handle(ctx auth.AuthContext) (bool, error)
Check signature in request. Call this handler after discovering user (ctx.AuthUser() must be not nil). Public key of user must be set for the user. signature is calculated as sig(sha256(RequestContent,RequestMethod,RequestPath))
func (*AuthSignature) SetAuthManager ¶
func (a *AuthSignature) SetAuthManager(manager auth.AuthManager)
type AuthSignatureConfig ¶
type AuthSignatureConfig struct { }
Click to show internal directories.
Click to hide internal directories.