update
This commit is contained in:
@@ -82,5 +82,9 @@ func (c *Config) Auth() *AuthConfig {
|
||||
secret: c.Jwt.TokenWithdraw.Secret,
|
||||
expireTTL: c.Jwt.TokenWithdraw.ExpiresTTL,
|
||||
},
|
||||
jwtCustomer: JWT{
|
||||
secret: c.Jwt.TokenCustomer.Secret,
|
||||
expireTTL: c.Jwt.TokenCustomer.ExpiresTTL,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ type AuthConfig struct {
|
||||
jwtOrderExpiresTTL int
|
||||
jwtSecretResetPassword JWT
|
||||
jwtWithdraw JWT
|
||||
jwtCustomer JWT
|
||||
}
|
||||
|
||||
type JWT struct {
|
||||
@@ -24,6 +25,10 @@ func (c *AuthConfig) AccessTokenOrderSecret() string {
|
||||
return c.jwtOrderSecret
|
||||
}
|
||||
|
||||
func (c *AuthConfig) AccessTokenCustomerSecret() string {
|
||||
return c.jwtCustomer.secret
|
||||
}
|
||||
|
||||
func (c *AuthConfig) AccessTokenWithdrawSecret() string {
|
||||
return c.jwtWithdraw.secret
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ type Jwt struct {
|
||||
TokenOrder Token `mapstructure:"token-order"`
|
||||
TokenResetPassword Token `mapstructure:"token-reset-password"`
|
||||
TokenWithdraw Token `mapstructure:"token-withdraw"`
|
||||
TokenCustomer Token `mapstructure:"token-customer"`
|
||||
}
|
||||
|
||||
type Token struct {
|
||||
|
||||
Reference in New Issue
Block a user