rentease/internal/auth/service.go
2024-05-25 16:38:25 +02:00

24 lines
426 B
Go

package auth
type Service struct {
secret string
admin string
adminSecret string
}
type ProviderIndex struct {
ProvidersMap map[string]string
Providers []string
}
func NewService(secret, admin, adminSecret string) *Service {
return &Service{
secret,
admin,
adminSecret,
}
}
func (as *Service) Authenticate(email, password string) bool {
return email == as.admin && password == as.adminSecret
}