Skip to content

Commit

Permalink
twitter: return user with access token secret
Browse files Browse the repository at this point in the history
  • Loading branch information
yinhm committed Apr 13, 2015
1 parent ac21cb0 commit 363e990
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions providers/twitter/twitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
user.UserID = user.RawData["id_str"].(string)
user.Location = user.RawData["location"].(string)
user.AccessToken = sess.AccessToken.Token
user.AccessTokenSecret = sess.AccessToken.Secret
return user, err
}

Expand Down
19 changes: 10 additions & 9 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package goth
// User contains the information common amongst most OAuth and OAuth2 providers.
// All of the "raw" datafrom the provider can be found in the `RawData` field.
type User struct {
RawData map[string]interface{}
Email string
Name string
NickName string
Description string
UserID string
AvatarURL string
Location string
AccessToken string
RawData map[string]interface{}
Email string
Name string
NickName string
Description string
UserID string
AvatarURL string
Location string
AccessToken string
AccessTokenSecret string
}

0 comments on commit 363e990

Please sign in to comment.