default autoredirect to false

Signed-off-by: David Wu <david.wu@docker.com>
This commit is contained in:
David Wu 2019-01-04 11:02:57 -08:00
parent 40b7b5830a
commit eb1a2cd911

View file

@ -162,11 +162,14 @@ func checkOptions(options map[string]interface{}) (tokenAccessOptions, error) {
opts.realm, opts.issuer, opts.service, opts.rootCertBundle = vals[0], vals[1], vals[2], vals[3] opts.realm, opts.issuer, opts.service, opts.rootCertBundle = vals[0], vals[1], vals[2], vals[3]
autoRedirect, ok := options["autoredirect"].(bool) autoRedirectVal, ok := options["autoredirect"]
if !ok { if ok {
return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect") autoRedirect, ok := autoRedirectVal.(bool)
if !ok {
return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect")
}
opts.autoRedirect = autoRedirect
} }
opts.autoRedirect = autoRedirect
return opts, nil return opts, nil
} }