Skip to content

Commit f5bf533

Browse files
committed
fix comment for SetExpiresAfter config
1 parent 27d9571 commit f5bf533

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

config.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ func (c *SignConfig) SetExpires(expires int64) *SignConfig {
6262
return c
6363
}
6464

65+
// SetExpiresAfter sets the "expires" parameter to createdTime + delay (seconds).
66+
// Use this for a relative validity window instead of an absolute timestamp.
67+
// Default: 0 (do not add the parameter).
68+
func (c *SignConfig) SetExpiresAfter(delay int64) *SignConfig {
69+
c.expiresAfter = delay
70+
return c
71+
}
72+
6573
// SetNonce adds a "nonce" string parameter whose content should be unique per signed message.
6674
// Default: empty string (do not add the parameter).
6775
func (c *SignConfig) SetNonce(nonce string) *SignConfig {

0 commit comments

Comments
 (0)