jwt validation, getting the correct database

This commit is contained in:
2018-11-07 20:13:26 +01:00
parent 549d91fbb4
commit 3347161ae9
13 changed files with 125 additions and 62 deletions

View File

@ -2,6 +2,7 @@ package test
import (
_ "multitenantStack/routers"
auth "multitenantStack/services/authentication"
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
@ -10,8 +11,7 @@ import (
func init() {
orm.RegisterDataBase("default", "postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre sslmode=disable")
orm.RegisterDataBase("company1", "postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company1 sslmode=disable")
orm.RegisterDataBase("company2", "postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company2 sslmode=disable")
auth.InitAuthService()
orm.Debug = true
beego.BConfig.WebConfig.DirectoryIndex = true