Skip to content

Commit

Permalink
* Return client_id by default on info request, so the application kno…
Browse files Browse the repository at this point in the history
…ws if this token is for its client_id
  • Loading branch information
RangelReale committed Jun 11, 2014
1 parent a974721 commit c80ed5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions info.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func (s *Server) FinishInfoRequest(w *Response, r *http.Request, ir *InfoRequest
}

// output data
w.Output["client_id"] = ir.AccessData.Client.Id
w.Output["access_token"] = ir.AccessData.AccessToken
w.Output["token_type"] = s.Config.TokenType
w.Output["expires_in"] = ir.AccessData.CreatedAt.Add(time.Duration(ir.AccessData.ExpiresIn)*time.Second).Sub(time.Now()) / time.Second
Expand Down

0 comments on commit c80ed5b

Please sign in to comment.