Documentation ¶
Overview ¶
Package signer provides functionality for signing IDIP requests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { AppId string `json:"idip-sign-appid"` Time string `json:"idip-sign-time"` Rnd string `json:"idip-sign-rnd"` Sign string `json:"idip-sign"` Version string `json:"idip-sign-version"` }
Header represents the signing headers used in requests
func (Header) Header2Map ¶
Header2Map converts a Header struct to a map[string]string
type ISigner ¶
type ISigner interface { Sign(body, tag string) string GenSignedHeader(body, tag string, version string) Header GetRnd() int GetTimestamp() int64 }
ISigner defines the interface for signing operations
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer implements the ISigner interface
func (Signer) GenSignedHeader ¶
GenSignedHeader generates a complete Header with signature
func (Signer) GetTimestamp ¶
GetTimestamp returns the timestamp used in signing
Click to show internal directories.
Click to hide internal directories.