diff options
Diffstat (limited to 'clientapi/auth')
-rw-r--r-- | clientapi/auth/password.go | 2 | ||||
-rw-r--r-- | clientapi/auth/user_interactive.go | 2 | ||||
-rw-r--r-- | clientapi/auth/user_interactive_test.go | 7 |
3 files changed, 7 insertions, 4 deletions
diff --git a/clientapi/auth/password.go b/clientapi/auth/password.go index f4814925..d9801955 100644 --- a/clientapi/auth/password.go +++ b/clientapi/auth/password.go @@ -35,7 +35,7 @@ type PasswordRequest struct { // LoginTypePassword implements https://matrix.org/docs/spec/client_server/r0.6.1#password-based type LoginTypePassword struct { GetAccountByPassword GetAccountByPassword - Config *config.Dendrite + Config *config.ClientAPI } func (t *LoginTypePassword) Name() string { diff --git a/clientapi/auth/user_interactive.go b/clientapi/auth/user_interactive.go index 581a85f0..c67eba15 100644 --- a/clientapi/auth/user_interactive.go +++ b/clientapi/auth/user_interactive.go @@ -110,7 +110,7 @@ type UserInteractive struct { Sessions map[string][]string } -func NewUserInteractive(getAccByPass GetAccountByPassword, cfg *config.Dendrite) *UserInteractive { +func NewUserInteractive(getAccByPass GetAccountByPassword, cfg *config.ClientAPI) *UserInteractive { typePassword := &LoginTypePassword{ GetAccountByPassword: getAccByPass, Config: cfg, diff --git a/clientapi/auth/user_interactive_test.go b/clientapi/auth/user_interactive_test.go index d12652c0..47d1cad3 100644 --- a/clientapi/auth/user_interactive_test.go +++ b/clientapi/auth/user_interactive_test.go @@ -33,8 +33,11 @@ func getAccountByPassword(ctx context.Context, localpart, plaintextPassword stri } func setup() *UserInteractive { - cfg := &config.Dendrite{} - cfg.Matrix.ServerName = serverName + cfg := &config.ClientAPI{ + Matrix: &config.Global{ + ServerName: serverName, + }, + } return NewUserInteractive(getAccountByPassword, cfg) } |