code: func checkOptions(options map[string]interface{}) (tokenAccessOptions, error) {
  	var opts tokenAccessOptions
  
  	keys := []string{"realm", "issuer", "service", "rootcertbundle"}
  	vals := make([]string, 0, len(keys))
  	for _, key := range keys {
  		val, ok := options[key].(string)
  		if !ok {
  			return opts, fmt.Errorf("token auth requires a valid option string: %q", key)
  		}
  		vals = append(vals, val)
  	}
  
  	opts.realm, opts.issuer, opts.service, opts.rootCertBundle = vals[0], vals[1], vals[2], vals[3]
  
  	autoRedirectVal, ok := options["autoredirect"]
  	if ok {
  		autoRedirect, ok := autoRedirectVal.(bool)
  		if !ok {
  			return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect")
  		}
  		opts.autoRedirect = autoRedirect
  	}
  
  	return opts, nil
  }
docs: // checkOptions gathers the necessary options
  // for an accessController from the given map.