Skip to content

Commit

Permalink
Include 'valid' field in auth status JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmitchell committed Oct 2, 2020
1 parent 7dbb77c commit a34ab5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions token_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ func (t TokenStatus) MarshalJSON() ([]byte, error) {
}

outStruct := struct {
Valid bool `json:"valid"`
CreationTime int64 `json:"creation_time"`
ExpireTime int64 `json:"expire_time"`
Renewable bool `json:"renewable"`
Policies []string `json:"policies"`
TTL int64 `json:"ttl"`
}{
Valid: t.valid,
CreationTime: floorZero(t.info.CreationTime.Unix()),
ExpireTime: floorZero(t.info.ExpireTime.Unix()),
Renewable: t.info.Renewable,
Expand Down

0 comments on commit a34ab5f

Please sign in to comment.