Add support for openid with github and facebook

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-10-04 11:40:56 -03:00
parent eebe638227
commit 4c034812d2
25 changed files with 712 additions and 251 deletions

View File

@@ -15,6 +15,7 @@ type Session struct {
StackName string `json:"stack_name" bson:"stack_name"`
ImageName string `json:"image_name" bson:"image_name"`
Host string `json:"host" bson:"host"`
UserId string `json:"user_id" bson:"user_id"`
rw sync.Mutex `json:"-"`
}

15
pwd/types/user.go Normal file
View File

@@ -0,0 +1,15 @@
package types
type User struct {
Id string `json:"id" bson:"id"`
Name string `json:"name" bson:"name"`
ProviderUserId string `json:"provider_user_id" bson:"provider_user_id"`
Avatar string `json:"avatar" bson:"avatar"`
Provider string `json:"provider" bson:"provider"`
Email string `json:"email" bson:"email"`
}
type LoginRequest struct {
Id string `json:"id" bson:"id"`
Provider string `json:"provider" bson:"provider"`
}