Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultExpireTimeInterval = time.Second * 120
Variables ¶
View Source
var ERR_SIGNATUREEXPIRED = errors.New("signature expired")
View Source
var ERR_SIGNATUREINVALID = func(e error) SIGNATUREINVALIDERR { return SIGNATUREINVALIDERR{content: "signature invalid: %w", err: e} }
View Source
var ERR_UIDINVALID = errors.New("uid invalid")
Functions ¶
func NewDefaultApiAuthenticator ¶ added in v0.1.1
func NewDefaultApiAuthenticator() *defaultApiAuthenticator
func NewDefaultApiAuthenticatorAsDriver ¶ added in v0.1.1
Types ¶
type ApiAuthenticator ¶
type ApiRequest ¶
type ApiRequest struct {
// contains filtered or unexported fields
}
func NewApiRequest ¶
func NewApiRequest(signature, metadata string, pubKey []byte) *ApiRequest
func NewApiRequestFromToken ¶ added in v0.1.1
func NewApiRequestFromToken(token string) (*ApiRequest, error)
func (*ApiRequest) GetMetadata ¶ added in v0.1.2
func (t *ApiRequest) GetMetadata() string
func (*ApiRequest) GetPublicKey ¶ added in v0.1.2
func (t *ApiRequest) GetPublicKey() []byte
func (*ApiRequest) GetSignature ¶ added in v0.1.2
func (t *ApiRequest) GetSignature() string
func (*ApiRequest) GetToken ¶ added in v0.1.2
func (t *ApiRequest) GetToken() string
type SIGNATUREINVALIDERR ¶ added in v0.1.1
type SIGNATUREINVALIDERR struct {
// contains filtered or unexported fields
}
func (SIGNATUREINVALIDERR) Error ¶ added in v0.1.1
func (e SIGNATUREINVALIDERR) Error() string
func (SIGNATUREINVALIDERR) Unwrap ¶ added in v0.1.1
func (e SIGNATUREINVALIDERR) Unwrap() error
type Signatory ¶ added in v0.1.1
type Signatory struct {
// contains filtered or unexported fields
}
func NewSignatory ¶ added in v0.1.1
func NewSignatoryFromMetadata ¶ added in v0.1.1
func (*Signatory) DoSignature ¶ added in v0.1.2
func (*Signatory) GetMetadata ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.