Skip to content

Commit

Permalink
Return expires_at as part of tokens payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Haris Khan committed Sep 16, 2019
1 parent ba20a82 commit 1590548
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions access.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,8 @@ func (s *Server) FinishAccessRequest(w *Response, r *http.Request, ar *AccessReq
w.Output["access_token"] = ret.AccessToken
w.Output["token_type"] = s.Config.TokenType
w.Output["expires_in"] = ret.ExpiresIn
w.Output["expires_at"] = ret.CreatedAt.Add(time.Second * time.Duration(ret.ExpiresIn))

if ret.RefreshToken != "" {
w.Output["refresh_token"] = ret.RefreshToken
}
Expand Down

0 comments on commit 1590548

Please sign in to comment.