forked from ebhomengo/niki
1
0
Fork 0
niki/service/auth/service.go

24 lines
488 B
Go
Raw Permalink Normal View History

package auth
2024-01-02 15:35:26 +00:00
import (
"time"
)
type Config struct {
SignKey string `koanf:"sign_key"`
AccessExpirationTime time.Duration `koanf:"access_expiration_time"`
RefreshExpirationTime time.Duration `koanf:"refresh_expiration_time"`
AccessSubject string `koanf:"access_subject"`
RefreshSubject string `koanf:"refresh_subject"`
}
type Service struct {
Config Config
2024-01-02 15:35:26 +00:00
}
func New(cfg Config) Service {
return Service{
Config: cfg,
2024-01-02 15:35:26 +00:00
}
}