forked from Mirrors/oauth2
jwt: added missing format specifier
Updates golang/oauth#151 Change-Id: I2422dade4d72aa4fc33d9ad922508d2793e4ee27 Reviewed-on: https://go-review.googlesource.com/14779 Reviewed-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
parent
d5ff5ab876
commit
82de3fe653
|
@ -55,7 +55,7 @@ func (c *ClaimSet) encode() (string, error) {
|
||||||
c.Exp = now.Add(time.Hour).Unix()
|
c.Exp = now.Add(time.Hour).Unix()
|
||||||
}
|
}
|
||||||
if c.Exp < c.Iat {
|
if c.Exp < c.Iat {
|
||||||
return "", fmt.Errorf("jws: invalid Exp must be later than Iat", c.Exp)
|
return "", fmt.Errorf("jws: invalid Exp = %v; must be later than Iat = %v", c.Exp, c.Iat)
|
||||||
}
|
}
|
||||||
|
|
||||||
b, err := json.Marshal(c)
|
b, err := json.Marshal(c)
|
||||||
|
|
Loading…
Reference in New Issue