fixed backward compatibility

This commit is contained in:
Sebastian Mancke
2017-05-04 23:26:39 +02:00
parent a1b77df942
commit d6064b178a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ func setup(c *caddy.Controller) error {
if len(args) == 1 {
logging.Logger.Warnf("DEPRECATED: Please set the loing path by parameter login_path and not as directive argument (%v:%v)", c.File(), c.Line())
config.LoginPath = args[0]
config.LoginPath = args[0] + "/login"
}
if e, isset := os.LookupEnv("JWT_SECRET"); isset {
+2 -2
View File
@@ -68,7 +68,7 @@ func TestSetup(t *testing.T) {
// * login path as argument
// * '-' in parameter names
// * backend config by 'backend provider='
input: `loginsrv /foo {
input: `loginsrv /context {
backend provider=simple,bob=secret
cookie-name cookiename
}`,
@@ -76,7 +76,7 @@ func TestSetup(t *testing.T) {
config: login.Config{
JwtSecret: "jwtsecret",
SuccessUrl: "/",
LoginPath: "/foo",
LoginPath: "/context/login",
CookieName: "cookiename",
CookieHttpOnly: true,
Backends: login.Options{