github.com/mattermost/mattermost-server/v5@v5.39.3/einterfaces/mocks/SamlInterface.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make einterfaces-mocks`. 4 5 package mocks 6 7 import ( 8 request "github.com/mattermost/mattermost-server/v5/app/request" 9 model "github.com/mattermost/mattermost-server/v5/model" 10 mock "github.com/stretchr/testify/mock" 11 ) 12 13 // SamlInterface is an autogenerated mock type for the SamlInterface type 14 type SamlInterface struct { 15 mock.Mock 16 } 17 18 // BuildRequest provides a mock function with given fields: relayState 19 func (_m *SamlInterface) BuildRequest(relayState string) (*model.SamlAuthRequest, *model.AppError) { 20 ret := _m.Called(relayState) 21 22 var r0 *model.SamlAuthRequest 23 if rf, ok := ret.Get(0).(func(string) *model.SamlAuthRequest); ok { 24 r0 = rf(relayState) 25 } else { 26 if ret.Get(0) != nil { 27 r0 = ret.Get(0).(*model.SamlAuthRequest) 28 } 29 } 30 31 var r1 *model.AppError 32 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 33 r1 = rf(relayState) 34 } else { 35 if ret.Get(1) != nil { 36 r1 = ret.Get(1).(*model.AppError) 37 } 38 } 39 40 return r0, r1 41 } 42 43 // CheckProviderAttributes provides a mock function with given fields: SS, ouser, patch 44 func (_m *SamlInterface) CheckProviderAttributes(SS *model.SamlSettings, ouser *model.User, patch *model.UserPatch) string { 45 ret := _m.Called(SS, ouser, patch) 46 47 var r0 string 48 if rf, ok := ret.Get(0).(func(*model.SamlSettings, *model.User, *model.UserPatch) string); ok { 49 r0 = rf(SS, ouser, patch) 50 } else { 51 r0 = ret.Get(0).(string) 52 } 53 54 return r0 55 } 56 57 // ConfigureSP provides a mock function with given fields: 58 func (_m *SamlInterface) ConfigureSP() error { 59 ret := _m.Called() 60 61 var r0 error 62 if rf, ok := ret.Get(0).(func() error); ok { 63 r0 = rf() 64 } else { 65 r0 = ret.Error(0) 66 } 67 68 return r0 69 } 70 71 // DoLogin provides a mock function with given fields: c, encodedXML, relayState 72 func (_m *SamlInterface) DoLogin(c *request.Context, encodedXML string, relayState map[string]string) (*model.User, *model.AppError) { 73 ret := _m.Called(c, encodedXML, relayState) 74 75 var r0 *model.User 76 if rf, ok := ret.Get(0).(func(*request.Context, string, map[string]string) *model.User); ok { 77 r0 = rf(c, encodedXML, relayState) 78 } else { 79 if ret.Get(0) != nil { 80 r0 = ret.Get(0).(*model.User) 81 } 82 } 83 84 var r1 *model.AppError 85 if rf, ok := ret.Get(1).(func(*request.Context, string, map[string]string) *model.AppError); ok { 86 r1 = rf(c, encodedXML, relayState) 87 } else { 88 if ret.Get(1) != nil { 89 r1 = ret.Get(1).(*model.AppError) 90 } 91 } 92 93 return r0, r1 94 } 95 96 // GetMetadata provides a mock function with given fields: 97 func (_m *SamlInterface) GetMetadata() (string, *model.AppError) { 98 ret := _m.Called() 99 100 var r0 string 101 if rf, ok := ret.Get(0).(func() string); ok { 102 r0 = rf() 103 } else { 104 r0 = ret.Get(0).(string) 105 } 106 107 var r1 *model.AppError 108 if rf, ok := ret.Get(1).(func() *model.AppError); ok { 109 r1 = rf() 110 } else { 111 if ret.Get(1) != nil { 112 r1 = ret.Get(1).(*model.AppError) 113 } 114 } 115 116 return r0, r1 117 }