Return tokens in the message body
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
Signed-off-by: Nikolai Rodionov <iam@allanger.xyz>
This commit is contained in:
@@ -38,7 +38,7 @@ type Server struct {
|
||||
DBConnectionString string `env:"SOFTPLAYER_DB_CONNECTION_STRING"`
|
||||
RedisHost string `env:"SOFTPLAYER_REDIS_HOST"`
|
||||
// JWT parameters
|
||||
RefrestTokenTTL time.Duration `default:"8h"`
|
||||
RefreshTokenTTL time.Duration `default:"8h"`
|
||||
AccessTokenTTL time.Duration `default:"15m"`
|
||||
JWTSecret string `default:"qwertyu9"`
|
||||
// Dev and logging
|
||||
@@ -71,7 +71,7 @@ func (cmd *Server) Run(ctx context.Context) error {
|
||||
authController := controllers.NewAuthController(
|
||||
[]byte(cmd.JWTSecret),
|
||||
cmd.AccessTokenTTL,
|
||||
cmd.RefrestTokenTTL,
|
||||
cmd.RefreshTokenTTL,
|
||||
rdb,
|
||||
)
|
||||
|
||||
@@ -106,7 +106,7 @@ func (cmd *Server) Run(ctx context.Context) error {
|
||||
HashCost: cmd.HashCost,
|
||||
DB: db,
|
||||
DevMode: cmd.DevMode,
|
||||
RefreshTokenTTL: cmd.RefrestTokenTTL,
|
||||
RefreshTokenTTL: cmd.RefreshTokenTTL,
|
||||
AccessTokenTTL: cmd.AccessTokenTTL,
|
||||
JWTSecret: []byte(cmd.JWTSecret),
|
||||
Redis: rdb,
|
||||
|
||||
Reference in New Issue
Block a user