Documentation ¶
Index ¶
- Variables
- func ExtractTimestampedSignature(signatureHeaderContent string) (t string, s string, err error)
- func VerifyGracePeriodSeconds(timestampString string, gracePeriod time.Duration) error
- type ErrExpiredSignatureTimestamp
- type ErrInvalidTimestampFormat
- type MockSignatureVerifier
- type SignatureVerifier
- type StellarSignatureVerifier
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStellarSignatureNotVerified = errors.New("neither Signature nor X-Stellar-Signature header could be verified")
)
Functions ¶
Types ¶
type ErrExpiredSignatureTimestamp ¶
type ErrExpiredSignatureTimestamp struct { ExpiredSignatureTimestamp time.Time CheckTime time.Time }
func (ErrExpiredSignatureTimestamp) Error ¶
func (e ErrExpiredSignatureTimestamp) Error() string
type ErrInvalidTimestampFormat ¶
type ErrInvalidTimestampFormat struct { TimestampString string // contains filtered or unexported fields }
func (ErrInvalidTimestampFormat) Error ¶
func (e ErrInvalidTimestampFormat) Error() string
type MockSignatureVerifier ¶
func (*MockSignatureVerifier) VerifySignature ¶
type SignatureVerifier ¶
type StellarSignatureVerifier ¶
func NewStellarSignatureVerifier ¶
func NewStellarSignatureVerifier(serverHostName, walletSigningKey string) (*StellarSignatureVerifier, error)
func (*StellarSignatureVerifier) VerifySignature ¶
func (sv *StellarSignatureVerifier) VerifySignature(ctx context.Context, signatureHeaderContent string, rawReqBody []byte) error
VerifySignature verifies the Signature or X-Stellar-Signature content and checks if the signature is signed for a known caller.
Click to show internal directories.
Click to hide internal directories.