certauth.go
func NewAuth(opts ...Options) *Auth {
	o := Options{}
	if len(opts) != 0 {
		o = opts[0]
	}

	h := defaultAuthErrorHandler
	if o.AuthErrorHandler != nil {
		h = o.AuthErrorHandler
	}

	return &Auth{
		opt:            o,
		authErrHandler: http.HandlerFunc(h),
	}
}
func NewAuth(opts ...Options) *Auth {
	o := Options{}
	if len(opts) != 0 {
		o = opts[0]
	}

	h := defaultAuthErrorHandler
	if o.AuthErrorHandler != nil {
		h = o.AuthErrorHandler
	}

	return &Auth{
		opt:            o,
		authErrHandler: http.HandlerFunc(h),
	}
}
// NewAuth returns an auth