code: func (s *ServicesTestSuite) AuthPreference(c *check.C) {
  	ap, err := services.NewAuthPreference(services.AuthPreferenceSpecV2{
  		Type:         "local",
  		SecondFactor: "otp",
  	})
  	c.Assert(err, check.IsNil)
  
  	err = s.ConfigS.SetAuthPreference(ap)
  	c.Assert(err, check.IsNil)
  
  	gotAP, err := s.ConfigS.GetAuthPreference()
  	c.Assert(err, check.IsNil)
  
  	c.Assert(gotAP.GetType(), check.Equals, "local")
  	c.Assert(gotAP.GetSecondFactor(), check.Equals, "otp")
  }
docs: // AuthPreference tests authentication preference service