Remove GetUserByEmail method.
This commit is contained in:
@@ -113,13 +113,6 @@ func (c *ConcreteClient) GetUserByParams(ctx context.Context, realm string, para
|
|||||||
return c.keycloakUserToLibregraph(users[0]), nil
|
return c.keycloakUserToLibregraph(users[0]), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetUserByEmail looks up a user by email.
|
|
||||||
func (c *ConcreteClient) GetUserByEmail(ctx context.Context, realm, mail string) (*libregraph.User, error) {
|
|
||||||
return c.GetUserByParams(ctx, realm, gocloak.GetUsersParams{
|
|
||||||
Email: &mail,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetUserByUsername looks up a user by username.
|
// GetUserByUsername looks up a user by username.
|
||||||
func (c *ConcreteClient) GetUserByUsername(ctx context.Context, realm, username string) (*libregraph.User, error) {
|
func (c *ConcreteClient) GetUserByUsername(ctx context.Context, realm, username string) (*libregraph.User, error) {
|
||||||
return c.GetUserByParams(ctx, realm, gocloak.GetUsersParams{
|
return c.GetUserByParams(ctx, realm, gocloak.GetUsersParams{
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ type Client interface {
|
|||||||
CreateUser(ctx context.Context, realm string, user *libregraph.User, userActions []UserAction) (string, error)
|
CreateUser(ctx context.Context, realm string, user *libregraph.User, userActions []UserAction) (string, error)
|
||||||
SendActionsMail(ctx context.Context, realm, userID string, userActions []UserAction) error
|
SendActionsMail(ctx context.Context, realm, userID string, userActions []UserAction) error
|
||||||
GetUserByParams(ctx context.Context, realm string, params gocloak.GetUsersParams) (*libregraph.User, error)
|
GetUserByParams(ctx context.Context, realm string, params gocloak.GetUsersParams) (*libregraph.User, error)
|
||||||
GetUserByEmail(ctx context.Context, realm, email string) (*libregraph.User, error)
|
|
||||||
GetUserByUsername(ctx context.Context, realm, username string) (*libregraph.User, error)
|
GetUserByUsername(ctx context.Context, realm, username string) (*libregraph.User, error)
|
||||||
GetPIIReport(ctx context.Context, realm, username string) (*PIIReport, error)
|
GetPIIReport(ctx context.Context, realm, username string) (*PIIReport, error)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,32 +68,6 @@ func (_m *Client) GetPIIReport(ctx context.Context, realm string, username strin
|
|||||||
return r0, r1
|
return r0, r1
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetUserByEmail provides a mock function with given fields: ctx, realm, email
|
|
||||||
func (_m *Client) GetUserByEmail(ctx context.Context, realm string, email string) (*libregraph.User, error) {
|
|
||||||
ret := _m.Called(ctx, realm, email)
|
|
||||||
|
|
||||||
var r0 *libregraph.User
|
|
||||||
var r1 error
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*libregraph.User, error)); ok {
|
|
||||||
return rf(ctx, realm, email)
|
|
||||||
}
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) *libregraph.User); ok {
|
|
||||||
r0 = rf(ctx, realm, email)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*libregraph.User)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
||||||
r1 = rf(ctx, realm, email)
|
|
||||||
} else {
|
|
||||||
r1 = ret.Error(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0, r1
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetUserByParams provides a mock function with given fields: ctx, realm, params
|
// GetUserByParams provides a mock function with given fields: ctx, realm, params
|
||||||
func (_m *Client) GetUserByParams(ctx context.Context, realm string, params gocloak.GetUsersParams) (*libregraph.User, error) {
|
func (_m *Client) GetUserByParams(ctx context.Context, realm string, params gocloak.GetUsersParams) (*libregraph.User, error) {
|
||||||
ret := _m.Called(ctx, realm, params)
|
ret := _m.Called(ctx, realm, params)
|
||||||
|
|||||||
Reference in New Issue
Block a user