SetShareExpiration sets the expiration time on share claim. It panics if bb isn't a "share" claim type. If t is zero, the expiration is removed.
(t time.Time)
| 392 | // It panics if bb isn't a "share" claim type. |
| 393 | // If t is zero, the expiration is removed. |
| 394 | func (bb *Builder) SetShareExpiration(t time.Time) *Builder { |
| 395 | if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim { |
| 396 | panic("called SetShareExpiration on non-share") |
| 397 | } |
| 398 | if t.IsZero() { |
| 399 | delete(bb.m, "expires") |
| 400 | } else { |
| 401 | bb.m["expires"] = RFC3339FromTime(t) |
| 402 | } |
| 403 | return bb |
| 404 | } |
| 405 | |
| 406 | func (bb *Builder) SetShareIsTransitive(b bool) *Builder { |
| 407 | if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim { |