summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMarkus Krogh <markus@nordu.net>2018-11-08 13:01:46 +0100
committerMarkus Krogh <markus@nordu.net>2018-11-08 13:01:46 +0100
commit95dd53eaa0f50171c8a6baf30ec591d285072caa (patch)
treecafe57bf41021f7f1e45e12379bbbe3563f3aa7a /main.go
parent564baa927dd3d5dddd721bb76c446362c24a8826 (diff)
Add logout url
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.go b/main.go
index 962c624..6a2ac75 100644
--- a/main.go
+++ b/main.go
@@ -18,6 +18,7 @@ type PwmanServer struct {
ChangePwScript string
RemoteUserHeader string
BasePath string
+ LogoutUrl string
}
var pwman *PwmanServer
@@ -25,7 +26,7 @@ var pwman *PwmanServer
const csrf_base = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._#%!&:;?+{}[]"
func main() {
- var ldapServer, ldapUser, ldapPassword, pwnedFile, krb5Conf, changePwScript, csrfSecret, serverAddr, basePath string
+ var ldapServer, ldapUser, ldapPassword, pwnedFile, krb5Conf, changePwScript, csrfSecret, serverAddr, basePath, logoutUrl string
var ldapPort int
var ldapSkipSSLVerify, csrfInsecure, gennerateCsrfKey bool
flag.StringVar(&ldapServer, "ldap-server", "localhost", "the ldap server address")
@@ -39,6 +40,7 @@ func main() {
flag.StringVar(&csrfSecret, "csrf-secret", "", "Specify csrf 32 char secret")
flag.StringVar(&serverAddr, "address", ":3000", "Server address to listen on")
flag.StringVar(&basePath, "base-path", "", "A base path that pwman lives under e.g. /sso")
+ flag.StringVar(&logoutUrl, "logout-url", "/Shibboleth.sso/Logout", "The path to use for allowing the user to log out")
flag.BoolVar(&csrfInsecure, "csrf-insecure", false, "Allow csrf cookie to be sent over http")
flag.BoolVar(&gennerateCsrfKey, "gennerate-csrf", false, "Gennerate a csrf secret")
flag.Parse()
@@ -61,6 +63,7 @@ func main() {
ChangePwScript: changePwScript,
RemoteUserHeader: "X-Remote-User",
BasePath: basePath,
+ LogoutUrl: LogoutUrl,
}
v := Views()