aboutsummaryrefslogtreecommitdiff
path: root/clientapi/auth
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-08-10 14:18:04 +0100
committerGitHub <noreply@github.com>2020-08-10 14:18:04 +0100
commit4b09f445c992fd0a389efc34d75aaa7e5bd50e9c (patch)
tree18d6168718ac06e569eb271f25ed4dc064010b50 /clientapi/auth
parentfdabba1851c489d801ea4029bce9dec7d415b2df (diff)
Configuration format v1 (#1230)
* Initial pass at refactoring config (not finished) * Don't forget current state and EDU servers * More shifting around * Update server key API tests * Fix roomserver test * Fix more tests * Further tweaks * Fix current state server test (sort of) * Maybe fix appservices * Fix client API test * Include database connection string in database options * Fix sync API build * Update config test * Fix unit tests * Fix federation sender build * Fix gobind build * Set Listen address for all services in HTTP monolith mode * Validate config, reinstate appservice derived in directory, tweaks * Tweak federation API test * Set MaxOpenConnections/MaxIdleConnections to previous values * Update generate-config
Diffstat (limited to 'clientapi/auth')
-rw-r--r--clientapi/auth/password.go2
-rw-r--r--clientapi/auth/user_interactive.go2
-rw-r--r--clientapi/auth/user_interactive_test.go7
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)
}