token-validator: introduce dummyAuth to avoid auth check
This commit is contained in:
parent
ad0a3eaf2b
commit
ffcccce709
2 changed files with 39 additions and 22 deletions
|
@ -60,6 +60,7 @@ func main() {
|
|||
flag.StringVar(&sharedSecret, "sharedsecret", "adelina", "secret used to communicate with remote validator")
|
||||
flag.StringVar(&AuthorizedKeysLocation, "authorizedkeyslocation", AuthorizedKeysLocation, "File for allowing user to SSH to the machine")
|
||||
flag.StringVar(&SshPiperLocation, "sshPiperLocation", SshPiperLocation, "Directory containing directories for sshpiperd")
|
||||
var dummyauth = flag.Bool("dummyauth", false, "don't perform password check")
|
||||
flag.Parse()
|
||||
|
||||
// Sanitize options
|
||||
|
@ -76,6 +77,10 @@ func main() {
|
|||
baseURL = &tmp
|
||||
}
|
||||
|
||||
if *dummyauth {
|
||||
AuthFunc = dummyAuth
|
||||
}
|
||||
|
||||
// Initialize contents
|
||||
log.Println("Opening database...")
|
||||
if err := DBInit(*dsn); err != nil {
|
||||
|
|
Reference in a new issue