Merge branch 'master' of https://github.com/piotrkochan/go-base into piotrkochan-master
This commit is contained in:
commit
6e627dd0a0
8 changed files with 35 additions and 29 deletions
|
|
@ -16,8 +16,8 @@ import (
|
|||
"github.com/go-chi/render"
|
||||
validation "github.com/go-ozzo/ozzo-validation"
|
||||
"github.com/go-ozzo/ozzo-validation/is"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/mssola/user_agent"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ func (rs *Resource) token(w http.ResponseWriter, r *http.Request) {
|
|||
browser, _ := ua.Browser()
|
||||
|
||||
token := &jwt.Token{
|
||||
Token: uuid.NewV4().String(),
|
||||
Token: uuid.Must(uuid.NewV4()).String(),
|
||||
Expiry: time.Now().Add(rs.TokenAuth.JwtRefreshExpiry),
|
||||
UpdatedAt: time.Now(),
|
||||
AccountID: acc.ID,
|
||||
|
|
@ -247,7 +247,7 @@ func (rs *Resource) refresh(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
token.Token = uuid.NewV4().String()
|
||||
token.Token = uuid.Must(uuid.NewV4()).String()
|
||||
token.Expiry = time.Now().Add(rs.TokenAuth.JwtRefreshExpiry)
|
||||
token.UpdatedAt = time.Now()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue