mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-27 22:57:28 +02:00
31 lines
679 B
Go
31 lines
679 B
Go
|
package goth
|
||
|
|
||
|
import (
|
||
|
"encoding/gob"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
gob.Register(User{})
|
||
|
}
|
||
|
|
||
|
// 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{}
|
||
|
Provider string
|
||
|
Email string
|
||
|
Name string
|
||
|
FirstName string
|
||
|
LastName string
|
||
|
NickName string
|
||
|
Description string
|
||
|
UserID string
|
||
|
AvatarURL string
|
||
|
Location string
|
||
|
AccessToken string
|
||
|
AccessTokenSecret string
|
||
|
RefreshToken string
|
||
|
ExpiresAt time.Time
|
||
|
}
|