1 parent 27d9571 commit f5bf533Copy full SHA for f5bf533
1 file changed
config.go
@@ -62,6 +62,14 @@ func (c *SignConfig) SetExpires(expires int64) *SignConfig {
62
return c
63
}
64
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
+
73
// SetNonce adds a "nonce" string parameter whose content should be unique per signed message.
74
// Default: empty string (do not add the parameter).
75
func (c *SignConfig) SetNonce(nonce string) *SignConfig {
0 commit comments