Yimaru-BackEnd/internal/services/authentication/service.go

31 lines
621 B
Go

package authentication
import "Yimaru-Backend/internal/ports"
// type EmailPhone struct {
// Email ValidString
// PhoneNumber ValidString
// Password ValidString
// }
type ValidString struct {
Value string
Valid bool
}
type Tokens struct {
AccessToken string
RefreshToken string
}
type Service struct {
userStore ports.UserStore
tokenStore ports.TokenStore
RefreshExpiry int
}
func NewService(userStore ports.UserStore, tokenStore ports.TokenStore, RefreshExpiry int) *Service {
return &Service{
userStore: userStore,
tokenStore: tokenStore,
RefreshExpiry: RefreshExpiry,
}
}