mirror of
https://github.com/wahyd4/loginsrv.git
synced 2026-08-09 04:46:29 +10:00
fixed backward compatibility
This commit is contained in:
+1
-1
@@ -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
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user