2023-12-17 14:19:05 +00:00
|
|
|
package config
|
|
|
|
|
2024-01-15 10:33:24 +00:00
|
|
|
import (
|
2024-01-25 11:43:39 +00:00
|
|
|
authservice "git.gocasts.ir/ebhomengo/niki/service/auth"
|
2024-01-15 10:33:24 +00:00
|
|
|
benefactorservice "git.gocasts.ir/ebhomengo/niki/service/benefactor/benefactor"
|
2024-08-16 17:37:37 +00:00
|
|
|
"git.gocasts.ir/ebhomengo/niki/service/notification"
|
2024-01-15 10:33:24 +00:00
|
|
|
)
|
|
|
|
|
2023-12-17 14:19:05 +00:00
|
|
|
func Default() Config {
|
2024-01-15 10:33:24 +00:00
|
|
|
cfx := Config{
|
2024-08-01 10:20:18 +00:00
|
|
|
BenefactorAuth: authservice.Config{
|
2024-01-15 10:33:24 +00:00
|
|
|
AccessExpirationTime: AccessTokenExpireDuration,
|
|
|
|
RefreshExpirationTime: RefreshTokenExpireDuration,
|
|
|
|
AccessSubject: AccessTokenSubject,
|
|
|
|
RefreshSubject: RefreshTokenSubject,
|
|
|
|
},
|
2024-01-25 11:43:39 +00:00
|
|
|
AdminAuth: authservice.Config{
|
|
|
|
AccessExpirationTime: AccessTokenExpireDuration,
|
|
|
|
RefreshExpirationTime: RefreshTokenExpireDuration,
|
|
|
|
AccessSubject: AccessTokenSubject,
|
|
|
|
RefreshSubject: RefreshTokenSubject,
|
|
|
|
},
|
2024-01-15 10:33:24 +00:00
|
|
|
BenefactorSvc: benefactorservice.Config{
|
|
|
|
OtpChars: OtpChars,
|
|
|
|
OtpExpireTime: OtpExpireTime,
|
|
|
|
},
|
2024-08-16 17:37:37 +00:00
|
|
|
NotificationSvc: notification.Config{
|
|
|
|
Timeout: NotificationTimeout,
|
|
|
|
},
|
2024-01-15 10:33:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return cfx
|
2023-12-17 14:19:05 +00:00
|
|
|
}
|