(e jwt.Expected)
| 21 | type RegisteredClaims jwt.Claims |
| 22 | |
| 23 | func (r RegisteredClaims) Validate(e jwt.Expected) error { |
| 24 | if r.Expiry == nil { |
| 25 | return xerrors.Errorf("expiry is required") |
| 26 | } |
| 27 | if e.Time.IsZero() { |
| 28 | return xerrors.Errorf("expected time is required") |
| 29 | } |
| 30 | |
| 31 | return (jwt.Claims(r)).Validate(e) |
| 32 | } |
| 33 | |
| 34 | // Claims defines the payload for a JWT. Most callers |
| 35 | // should embed jwt.Claims |