// New returns initialized Auth.
// If Authenticator or UserFetcher are nil, return the error.
New returns initialized Auth.
If Authenticator or UserFetcher are nil, return the error.
// New returns initialized Auth . // If Authenticator or UserFetcher are nil return the error .
func New(a Auth) (Auth, error) {
	if a.Authenticator == nil {
		return Auth{}, errors.New("missing Auth.Authenticator")
	}
	if a.UserFetcher == nil {
		return Auth{}, errors.New("missing Auth.UserFetcher")
	}
	if a.SigningMethod == "" {
		a.SigningMethod = "HS256"
	}
	if a.ExpiryInterval == 0 {
		a.ExpiryInterval = time.Hour
	}
	a.nowFunc = time.Now
	return a, nil
}
func New ( a Auth ) ( Auth , error ) { if a . Authenticator == nil { return Auth { } , errors . New ( " " ) } if a . UserFetcher == nil { return Auth { } , errors . New ( " " ) } if a . SigningMethod == " " { a . SigningMethod = " " } if a . ExpiryInterval == 0 { a . ExpiryInterval = time . Hour } a . nowFunc = time . Now return a , nil }
New returns initialized Auth.
New returns initialized Auth .