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

@@ -13,7 +13,7 @@ type Mock struct {
mock.Mock
}
func (m *Mock) SessionNew(duration time.Duration, stack string, stackName, imageName string) (*types.Session, error) {
func (m *Mock) SessionNew(userId string, duration time.Duration, stack string, stackName, imageName string) (*types.Session, error) {
args := m.Called(duration, stack, stackName, imageName)
return args.Get(0).(*types.Session), args.Error(1)
}
@@ -104,3 +104,18 @@ func (m *Mock) ClientCount() int {
args := m.Called()
return args.Int(0)
}
func (m *Mock) UserNewLoginRequest(providerName string) (*types.LoginRequest, error) {
args := m.Called(providerName)
return args.Get(0).(*types.LoginRequest), args.Error(1)
}
func (m *Mock) UserGetLoginRequest(id string) (*types.LoginRequest, error) {
args := m.Called(id)
return args.Get(0).(*types.LoginRequest), args.Error(1)
}
func (m *Mock) UserLogin(loginRequest *types.LoginRequest, user *types.User) (*types.User, error) {
args := m.Called(loginRequest, user)
return args.Get(0).(*types.User), args.Error(1)
}