1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-02-13 13:58:38 +02:00

require SessionStoreMaker and CookieStoreMaker at startup instead of panicing on the first hit

This commit is contained in:
Dave Gray 2016-06-21 23:36:00 -07:00
parent 3e77b1fd27
commit 8996a36b05

View File

@ -45,6 +45,12 @@ func (r *Register) Initialize(ab *authboss.Authboss) (err error) {
return errors.New("register: Need a RegisterStorer")
}
if ab.SessionStoreMaker == nil {
return errors.New("register: Need a SessionStoreMaker")
} else if ab.CookieStoreMaker == nil {
return errors.New("register: Need a CookieStoreMaker")
}
if r.templates, err = response.LoadTemplates(r.Authboss, r.Layout, r.ViewsPath, tplRegister); err != nil {
return err
}