mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-11 13:16:50 +00:00
24 lines
426 B
Go
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
|
|
}
|